Forced BufRead on BufWInEnter to reload modelines even with loadview

This commit is contained in:
Claudio Maggioni (maggicl) 2019-08-12 11:25:43 +02:00
parent a52a3add47
commit 2a76fb6ce9

View file

@ -169,7 +169,7 @@ tnoremap <C-Esc> <Esc>
augroup AutoSaveFolds augroup AutoSaveFolds
autocmd! autocmd!
autocmd BufWinLeave * silent! mkview autocmd BufWinLeave * silent! mkview
autocmd BufWinEnter * silent! loadview autocmd BufWinEnter * silent! loadview | doautocmd BufRead
augroup END augroup END
" clear search pattern with F2 " clear search pattern with F2
@ -178,6 +178,9 @@ noremap <F2> :let @/ = ""<CR>
" Switch between Windows with: Leader w " Switch between Windows with: Leader w
nnoremap <Leader>w <C-w><C-w> nnoremap <Leader>w <C-w><C-w>
" Re-read buffer and load modelines with: Leader m
nnoremap <Leader>m :doautocmd BufRead<CR>
" Open fzf with all files in git with: Leader f " Open fzf with all files in git with: Leader f
nnoremap <Leader>f :GFiles<CR> nnoremap <Leader>f :GFiles<CR>