diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-03 22:51:52 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-03 22:51:52 +1200 |
commit | f81cbabed06817ce0286b20242664d68d29a646d (patch) | |
tree | ce1212357743ab6d747a49e6773148ca6ee274ee | |
parent | Factor out Vim version checks into autoload func (diff) | |
download | dotfiles-f81cbabed06817ce0286b20242664d68d29a646d.tar.gz dotfiles-f81cbabed06817ce0286b20242664d68d29a646d.zip |
Add vim-keep-position v0.1.0
-rw-r--r-- | .gitmodules | 3 | ||||
m--------- | vim/bundle/keep_position | 0 | ||||
-rw-r--r-- | vim/vimrc | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules index 2526e82f..1c789480 100644 --- a/.gitmodules +++ b/.gitmodules @@ -93,3 +93,6 @@ [submodule "vim/bundle/sahara"] path = vim/bundle/sahara url = https://sanctum.geek.nz/code/vim-sahara.git +[submodule "vim/bundle/keep_position"] + path = vim/bundle/keep_position + url = https://sanctum.geek.nz/code/vim-keep-position.git diff --git a/vim/bundle/keep_position b/vim/bundle/keep_position new file mode 160000 +Subproject d350864ef0b3218bb712d9c17fdb8d4f454f8e9 @@ -406,9 +406,9 @@ nnoremap <Leader>y :<C-U>registers<CR> nnoremap <Leader>z :<C-U>setlocal spelllang=en_nz<CR> " \= runs the whole buffer through =, preserving position -nnoremap <Leader>= m`1G=G`` +nnoremap <Leader>= :<C-U>KeepPosition normal! 1G=G<CR> " \+ runs the whole buffer through gq, preserving position -nnoremap <Leader>+ m`1GgqG`` +nnoremap <Leader>+ :<C-U>KeepPosition normal! 1GgqG<CR> " \. runs the configured make program into the location list nnoremap <Leader>. :<C-U>lmake!<CR> |