From 950f883d89ca0fa7e80cca8f9a0d8cfbade8ebc3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 9 Jul 2018 01:15:22 +1200 Subject: Overhaul ftplugin check, lint, tidy - Set 'equalprg' for HTML and Perl - Discard filter#Stable() - Set default :compiler for all applicable filetypes - Change local leader mappings for Perl and shell script merely to set :compiler, rather than running it - Bind global leader mapping for running :lmake! - Bind global leader mappings for applying 'equalprg' and 'formatprg' to the whole buffer, using a new autoloaded helper function vimrc#Anchor() to avoid the cursor jumping around --- vim/autoload/vimrc.vim | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 vim/autoload/vimrc.vim (limited to 'vim/autoload/vimrc.vim') diff --git a/vim/autoload/vimrc.vim b/vim/autoload/vimrc.vim new file mode 100644 index 00000000..0dff8ffd --- /dev/null +++ b/vim/autoload/vimrc.vim @@ -0,0 +1,6 @@ +" Run some normal-mode keystrokes without jumping around +function! vimrc#Anchor(keys) abort + let l:view = winsaveview() + execute 'normal! '.a:keys + call winrestview(l:view) +endfunction -- cgit v1.2.3