stop sourcing vimrc on every save
This commit is contained in:
parent
e75653b4ef
commit
4198c155a1
1 changed files with 8 additions and 2 deletions
|
@ -171,9 +171,11 @@ nnoremap <tab> %
|
||||||
" select the whole buffer with <leader>-a
|
" select the whole buffer with <leader>-a
|
||||||
map <leader>a ggVG
|
map <leader>a ggVG
|
||||||
|
|
||||||
" quickly edit vimrc and source it on saving, useful for testing
|
" quickly edit vimrc with leader+V
|
||||||
map <leader>V :vsp ~/.config/nvim/init.vim<cr>
|
map <leader>V :vsp ~/.config/nvim/init.vim<cr>
|
||||||
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
|
" get rid of the help message popping up when I miss esc and hit F1
|
||||||
nnoremap <F1> <ESC>
|
nnoremap <F1> <ESC>
|
||||||
|
@ -181,7 +183,11 @@ inoremap <F1> <ESC>
|
||||||
vnoremap <F1> <ESC>
|
vnoremap <F1> <ESC>
|
||||||
|
|
||||||
" remove all trailing whitespaces
|
" remove all trailing whitespaces
|
||||||
|
" on pressing space+W
|
||||||
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
|
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
|
||||||
|
" automatically on saving
|
||||||
|
" autocmd BufWritePre * :%s/\s\+$//e
|
||||||
|
|
||||||
|
|
||||||
" 'open new tab' with leader-t (opens new buffer and switches to it)
|
" 'open new tab' with leader-t (opens new buffer and switches to it)
|
||||||
" open actual new tab with leader-T
|
" open actual new tab with leader-T
|
||||||
|
|
Loading…
Reference in a new issue