diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 01:03:29 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 01:03:29 +1200 |
commit | ecfe5d6756bd351409592f59ac55c0075bc7257f (patch) | |
tree | 32206a210c1f52635625e7a28fc05994d539906a | |
parent | Switch to more robust $MYVIM definition (diff) | |
download | dotfiles-ecfe5d6756bd351409592f59ac55c0075bc7257f.tar.gz dotfiles-ecfe5d6756bd351409592f59ac55c0075bc7257f.zip |
Simplify \= and \+ maps to remove autoload
It always bugged me that I had just the one little function in here,
when everything else is either neatly self-contained or dependent on a
plugin. These maps should be good enough.
-rw-r--r-- | vim/autoload/vimrc.vim | 6 | ||||
-rw-r--r-- | vim/vimrc | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/vim/autoload/vimrc.vim b/vim/autoload/vimrc.vim deleted file mode 100644 index 1af59c07..00000000 --- a/vim/autoload/vimrc.vim +++ /dev/null @@ -1,6 +0,0 @@ -" Run some normal-mode keystrokes without jumping around -function! vimrc#Anchor(keys) abort - let view = winsaveview() - execute 'normal! '.a:keys - call winrestview(view) -endfunction @@ -418,9 +418,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>= :<C-U>call vimrc#Anchor('1G=G')<CR> +nnoremap <Leader>= m`1G=G`` " \+ runs the whole buffer through gq, preserving position -nnoremap <Leader>+ :<C-U>call vimrc#Anchor('1GgqG')<CR> +nnoremap <Leader>+ m`1GgqG`` " \. runs the configured make program into the location list nnoremap <Leader>. :<C-U>lmake!<CR> |