aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-03-15 23:01:48 +0800
committerGuangxiong Lin <[email protected]>2022-03-15 23:01:48 +0800
commit77d4aa352070926699f8f2f5990753a8820e790f (patch)
tree8aee59a2ea4ee7f17daec4a7ab0413c5bc333de1
parent42aa5a42061c0523b4feeac4b5643d1a2aed3a42 (diff)
downloaddotfiles-77d4aa352070926699f8f2f5990753a8820e790f.tar.gz
dotfiles-77d4aa352070926699f8f2f5990753a8820e790f.tar.bz2
dotfiles-77d4aa352070926699f8f2f5990753a8820e790f.zip
Use jk to visual move line (vim) (emacs)
-rw-r--r--.emacs.d/lisp/init-evil.el5
-rw-r--r--.emacs.d/lisp/init-org.el2
-rw-r--r--.vim/after/ftplugin/markdown.vim2
-rw-r--r--.vimrc1
4 files changed, 8 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el
index 5402cd9..55a42c8 100644
--- a/.emacs.d/lisp/init-evil.el
+++ b/.emacs.d/lisp/init-evil.el
@@ -15,6 +15,11 @@
(evil-define-key 'normal 'global
(kbd "gj") 'evil-next-visual-line
(kbd "gk") 'evil-previous-visual-line)
+ (evil-define-key 'normal text-mode-map
+ (kbd "j") 'evil-next-visual-line
+ (kbd "k") 'evil-previous-visual-line
+ (kbd "gj") 'evil-next-line
+ (kbd "gk") 'evil-previous-line)
(gx/diminish 'evil-mode))
;; evil-collection
diff --git a/.emacs.d/lisp/init-org.el b/.emacs.d/lisp/init-org.el
index 0ead7cf..c9cd221 100644
--- a/.emacs.d/lisp/init-org.el
+++ b/.emacs.d/lisp/init-org.el
@@ -29,8 +29,6 @@
(kbd "TAB") 'org-cycle
(kbd "RET") 'org-open-at-point
(kbd "H") 'org-toggle-heading
- (kbd "j") 'evil-next-visual-line
- (kbd "k") 'evil-previous-visual-line
(kbd "<leader>r") 'org-refile
diff --git a/.vim/after/ftplugin/markdown.vim b/.vim/after/ftplugin/markdown.vim
new file mode 100644
index 0000000..3a06501
--- /dev/null
+++ b/.vim/after/ftplugin/markdown.vim
@@ -0,0 +1,2 @@
+nmap <buffer> j gj
+nmap <buffer> k gk
diff --git a/.vimrc b/.vimrc
index e1138b4..8fd04f9 100644
--- a/.vimrc
+++ b/.vimrc
@@ -10,6 +10,7 @@ set autoread
set mouse=a
filetype on
filetype indent on
+filetype plugin on
set modeline
set textwidth=72
set formatoptions+=mB