mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-14 08:01:35 +09:00
Emacs : use undo tree, and keybindings
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
#+title: Emacs Configuration
|
#+title: Emacs Configuration
|
||||||
|
#+AUTHOR: JaeYoo-Im, (cpu3792@gmail.com)
|
||||||
|
|
||||||
* Basic Configuration
|
* Basic Configuration
|
||||||
Emacs Configuration for emacs 29.50
|
Emacs Configuration for emacs 29.50
|
||||||
@ -359,19 +360,6 @@ emacs built-in package config
|
|||||||
doom-modeline-indent-info t)
|
doom-modeline-indent-info t)
|
||||||
(doom-modeline-mode 1)
|
(doom-modeline-mode 1)
|
||||||
#+end_src
|
#+end_src
|
||||||
**** Whiteroom
|
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-ui.el
|
|
||||||
;;(use-package writeroom-mode
|
|
||||||
;; :defer t
|
|
||||||
;; :straight (:build t)
|
|
||||||
;; :init (global-writeroom-mode 1)
|
|
||||||
;; :config
|
|
||||||
;; (setq writeroom-width 100
|
|
||||||
;; writeroom-fullscreen-effect nil
|
|
||||||
;; writeroom-maximize-window nil
|
|
||||||
;; writeroom-mode-line t
|
|
||||||
;; writeroom-major-modes '(text-mode org-mode markdown-mode nov-mode Info-mode)))
|
|
||||||
#+end_src
|
|
||||||
**** Visual Fill Column
|
**** Visual Fill Column
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-ui.el
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-ui.el
|
||||||
(require 'visual-fill-column)
|
(require 'visual-fill-column)
|
||||||
@ -466,7 +454,7 @@ emacs built-in package config
|
|||||||
(usr-package-install 'evil-collection)
|
(usr-package-install 'evil-collection)
|
||||||
(usr-package-install 'evil-nerd-commenter)
|
(usr-package-install 'evil-nerd-commenter)
|
||||||
(usr-package-install 'evil-numbers)
|
(usr-package-install 'evil-numbers)
|
||||||
;;(usr-package-install 'undo-tree)
|
(usr-package-install 'undo-tree)
|
||||||
(usr-package-install 'hydra)
|
(usr-package-install 'hydra)
|
||||||
#+end_src
|
#+end_src
|
||||||
**** Global Key
|
**** Global Key
|
||||||
@ -518,18 +506,8 @@ for managing keybindings.
|
|||||||
"f o p" '((lambda () (interactive) (find-file (expand-file-name "~/org/example/emacs_my_previous.org"))) :which-key "open exwm config")
|
"f o p" '((lambda () (interactive) (find-file (expand-file-name "~/org/example/emacs_my_previous.org"))) :which-key "open exwm config")
|
||||||
"f o e" '((lambda () (interactive) (find-file (expand-file-name "~/org/example/emacs_another.org"))) :which-key "open exwm config")
|
"f o e" '((lambda () (interactive) (find-file (expand-file-name "~/org/example/emacs_another.org"))) :which-key "open exwm config")
|
||||||
"f o c" '((lambda () (interactive) (find-file (expand-file-name "~/.config/emacs/emacs.org"))) :which-key "open emacs config")
|
"f o c" '((lambda () (interactive) (find-file (expand-file-name "~/.config/emacs/emacs.org"))) :which-key "open emacs config")
|
||||||
;; Hydra
|
|
||||||
"h" '(:ignore t :which-key "hydra")
|
|
||||||
"h t" '(hydra-text-scale/body :which-key "scale text")
|
|
||||||
"h w" '(hydra-writeroom-scale/body :which-key "scale whiteroom")
|
|
||||||
"h a" '(hydra-modify-alpha/body :which-key "modify alpha background")
|
|
||||||
;; Insert something
|
;; Insert something
|
||||||
"i" '(:ignore t :which-key "insert something.")
|
"i" '(:ignore t :which-key "insert something.")
|
||||||
"i s" '(yas-insert-snippet :which-key "snippet")
|
|
||||||
"i e" '(emojify-insert-emoji :which-key "emoji")
|
|
||||||
;; Magit
|
|
||||||
"g" '(:ignore t :which-key "magit")
|
|
||||||
"g g" '(magit :which-key "magit")
|
|
||||||
;; Project-el
|
;; Project-el
|
||||||
"p" '(:ignore t :which-key "project")
|
"p" '(:ignore t :which-key "project")
|
||||||
"p ." '(project-switch-project :which-key "switch project")
|
"p ." '(project-switch-project :which-key "switch project")
|
||||||
@ -541,7 +519,6 @@ for managing keybindings.
|
|||||||
"p e" '(project-eshell :which-key "eshell")
|
"p e" '(project-eshell :which-key "eshell")
|
||||||
"p d" '(project-dired :which-key "dired")
|
"p d" '(project-dired :which-key "dired")
|
||||||
"p g" '(project-find-regexp :which-key "find-regexp")
|
"p g" '(project-find-regexp :which-key "find-regexp")
|
||||||
|
|
||||||
;; Extra
|
;; Extra
|
||||||
"t" '(:ignore t :which-key "extra")
|
"t" '(:ignore t :which-key "extra")
|
||||||
"t a" '(toggle-transparency :which-key "Toggle Transparency")
|
"t a" '(toggle-transparency :which-key "Toggle Transparency")
|
||||||
@ -562,7 +539,8 @@ for managing keybindings.
|
|||||||
;; Make evil search more like vim
|
;; Make evil search more like vim
|
||||||
;;(evil-select-search-module 'evil-search-module 'evil-search)
|
;;(evil-select-search-module 'evil-search-module 'evil-search)
|
||||||
|
|
||||||
(evil-set-undo-system 'undo-redo)
|
(evil-set-undo-system 'undo-tree)
|
||||||
|
;;(evil-set-undo-system 'undo-redo)
|
||||||
(evil-set-initial-state 'messages-buffer-mode 'normal)
|
(evil-set-initial-state 'messages-buffer-mode 'normal)
|
||||||
(evil-set-initial-state 'dashboard-mode 'normal)
|
(evil-set-initial-state 'dashboard-mode 'normal)
|
||||||
|
|
||||||
@ -589,15 +567,15 @@ for managing keybindings.
|
|||||||
#+end_src
|
#+end_src
|
||||||
**** Undo Tree
|
**** Undo Tree
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-keybindings.el
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-keybindings.el
|
||||||
;;(require 'undo-tree)
|
(require 'undo-tree)
|
||||||
;;(setq undo-tree-visualizer-diff t
|
(setq undo-tree-visualizer-diff t
|
||||||
;; undo-tree-visualizer-timestamps t
|
undo-tree-visualizer-timestamps t
|
||||||
;; undo-tree-auto-save-history t
|
undo-tree-auto-save-history t
|
||||||
;; undo-tree-enable-undo-in-region t
|
undo-tree-enable-undo-in-region t
|
||||||
;; undo-limit (* 800 1024)
|
undo-limit (* 800 1024)
|
||||||
;; undo-strong-limit (* 12 1024 1024)
|
undo-strong-limit (* 12 1024 1024)
|
||||||
;; undo-outer-limit (* 128 1024 1024))
|
undo-outer-limit (* 128 1024 1024))
|
||||||
;;(global-undo-tree-mode)
|
(global-undo-tree-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
**** Hydra
|
**** Hydra
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-keybindings.el
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-keybindings.el
|
||||||
@ -617,6 +595,12 @@ for managing keybindings.
|
|||||||
("s" my/decrease-frame-alpha-background "decrease alpha")
|
("s" my/decrease-frame-alpha-background "decrease alpha")
|
||||||
("t" my/increase-frame-alpha-background "increase alpha")
|
("t" my/increase-frame-alpha-background "increase alpha")
|
||||||
("q" nil "finished" :exit t))
|
("q" nil "finished" :exit t))
|
||||||
|
(ju/leader-key-def
|
||||||
|
;; Hydra
|
||||||
|
"h" '(:ignore t :which-key "hydra")
|
||||||
|
"h t" '(hydra-text-scale/body :which-key "scale text")
|
||||||
|
"h w" '(hydra-writeroom-scale/body :which-key "scale whiteroom")
|
||||||
|
"h a" '(hydra-modify-alpha/body :which-key "modify alpha background"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
**** Provide Modules
|
**** Provide Modules
|
||||||
@ -786,6 +770,10 @@ get link from pdf,
|
|||||||
;; ;;:custom
|
;; ;;:custom
|
||||||
(setq magit-clone-default-directory "~/Project/"
|
(setq magit-clone-default-directory "~/Project/"
|
||||||
magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
|
magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
|
||||||
|
(ju/leader-key-def
|
||||||
|
;; Magit
|
||||||
|
"g" '(:ignore t :which-key "magit")
|
||||||
|
"g g" '(magit :which-key "magit"))
|
||||||
#+end_src
|
#+end_src
|
||||||
**** Gitgutter
|
**** Gitgutter
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el
|
||||||
@ -956,6 +944,9 @@ speed-up insertion of environments and math templates.
|
|||||||
(usr-package-install 'pdf-view-restore)
|
(usr-package-install 'pdf-view-restore)
|
||||||
(usr-package-install 'nov)
|
(usr-package-install 'nov)
|
||||||
(usr-package-install 'emojify)
|
(usr-package-install 'emojify)
|
||||||
|
(usr-package-install 'avy)
|
||||||
|
(usr-package-install 'yasnippet)
|
||||||
|
(usr-package-install 'yasnippet-snippets)
|
||||||
#+end_src
|
#+end_src
|
||||||
**** Helpful
|
**** Helpful
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
||||||
@ -968,11 +959,29 @@ speed-up insertion of environments and math templates.
|
|||||||
(global-set-key [remap describe-variable] #'describe-variable)
|
(global-set-key [remap describe-variable] #'describe-variable)
|
||||||
(global-set-key [remap describe-key] #'helpful-key)
|
(global-set-key [remap describe-key] #'helpful-key)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
**** Avy
|
||||||
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
||||||
|
(ju/leader-key-def
|
||||||
|
"v" '(:ignore t :which-key "Avy")
|
||||||
|
"vc" '(avy-goto-char :which-key "Avy Goto Char")
|
||||||
|
"vw" '(avy-goto-word-0 :which-key "Avy Goto Word")
|
||||||
|
"vl" '(avy-goto-line :which-key "Avy Goto Line"))
|
||||||
|
#+end_src
|
||||||
|
**** Snippet
|
||||||
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
||||||
|
(defvar yas-snippet-dirs nil)
|
||||||
|
(add-hook 'prog-mode-hook #'yas-minor-mode)
|
||||||
|
(add-to-list 'yas-snippet-dirs "~/.config/emacs/snippets")
|
||||||
|
(yas-global-mode 1)
|
||||||
|
(ju/leader-key-def
|
||||||
|
"i s" '(yas-insert-snippet :which-key "snippet"))
|
||||||
|
#+end_src
|
||||||
**** Emojify
|
**** Emojify
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
||||||
(global-emojify-mode 1)
|
(global-emojify-mode 1)
|
||||||
|
(ju/leader-key-def
|
||||||
|
"i e" '(emojify-insert-emoji :which-key "emoji"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
**** PDF Tool
|
**** PDF Tool
|
||||||
enhanced PDF viewer on emacs
|
enhanced PDF viewer on emacs
|
||||||
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-extra.el
|
||||||
|
|||||||
Reference in New Issue
Block a user