aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-03 22:51:52 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-03 22:51:52 +1200
commitf81cbabed06817ce0286b20242664d68d29a646d (patch)
treece1212357743ab6d747a49e6773148ca6ee274ee
parentFactor out Vim version checks into autoload func (diff)
downloaddotfiles-f81cbabed06817ce0286b20242664d68d29a646d.tar.gz
dotfiles-f81cbabed06817ce0286b20242664d68d29a646d.zip
Add vim-keep-position v0.1.0
-rw-r--r--.gitmodules3
m---------vim/bundle/keep_position0
-rw-r--r--vim/vimrc4
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
diff --git a/vim/vimrc b/vim/vimrc
index 302f1388..74b60b74 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -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>