aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-20 22:32:02 +0800
committerGuangxiong Lin <[email protected]>2022-04-20 22:32:02 +0800
commitc70c0a7c16ab18658464f85c6bd167eed2a42e8c (patch)
tree35eba4cbed7c120f2788d1046f6b843241d8ed55
parent0467812d22306d704e79aaf5b5096669cd432777 (diff)
downloaddotfiles-c70c0a7c16ab18658464f85c6bd167eed2a42e8c.tar.gz
dotfiles-c70c0a7c16ab18658464f85c6bd167eed2a42e8c.tar.bz2
dotfiles-c70c0a7c16ab18658464f85c6bd167eed2a42e8c.zip
Improve emacs config
-rw-r--r--.emacs.d/lisp/init-misc.el19
1 files changed, 17 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-misc.el b/.emacs.d/lisp/init-misc.el
index aab95f7..4275c5c 100644
--- a/.emacs.d/lisp/init-misc.el
+++ b/.emacs.d/lisp/init-misc.el
@@ -39,11 +39,16 @@
(xterm-mouse-mode 1) ;; Enable mouse
(tool-bar-mode -1)
(scroll-bar-mode -1)
+ ;; Auto reload buffers whenever they are updated externally
(global-auto-revert-mode t)
- (global-so-long-mode 1)
+ (global-so-long-mode 1) ;; Disable some modes when the files are so long
(recentf-mode)
(show-paren-mode)
- (fset 'yes-or-no-p 'y-or-n-p))
+ (fset 'yes-or-no-p 'y-or-n-p)
+ ;; Show column number in modeline
+ (column-number-mode)
+ ;; Show the size of file in modeline
+ (size-indication-mode))
'append)
(with-eval-after-load 'hideshow
@@ -77,4 +82,14 @@
(kbd "[g") 'flymake-goto-prev-error
(kbd "]g") 'flymake-goto-next-error))
+(add-hook 'after-init-hook #'winner-mode 'append)
+(with-eval-after-load 'evil
+ (evil-define-key 'normal 'global
+ (kbd "C-w u") 'winner-undo
+ (kbd "C-w C-u") 'winner-undo
+ (kbd "C-w U") 'winner-redo
+ (kbd "C-w C-U") 'winner-redo))
+
+(add-hook 'after-init-hook #'save-place-mode 'append)
+
(provide 'init-misc)