From 4198c155a12e63f99b41ad82fa4a7b76b237eae9 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 20 Mar 2019 14:30:36 +0100 Subject: [PATCH] stop sourcing vimrc on every save --- .config/nvim/init.vim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8a68e18..9eefd79 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -171,9 +171,11 @@ nnoremap % " select the whole buffer with -a map a ggVG -" quickly edit vimrc and source it on saving, useful for testing +" quickly edit vimrc with leader+V map V :vsp ~/.config/nvim/init.vim -au BufWritePost init.vim so ~/.config/nvim/init.vim +" automatically source the vimrc file whenever it is saved (causes slowdown +" when done in MANY successions) +" au BufWritePost init.vim so ~/.config/nvim/init.vim " get rid of the help message popping up when I miss esc and hit F1 nnoremap @@ -181,7 +183,11 @@ inoremap vnoremap " remove all trailing whitespaces +" on pressing space+W nnoremap W :%s/\s\+$//:let @/='' +" automatically on saving +" autocmd BufWritePre * :%s/\s\+$//e + " 'open new tab' with leader-t (opens new buffer and switches to it) " open actual new tab with leader-T