From 20bbb154467e63ce6fbae48c13fac9d3fba95587 Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Sat, 13 Jun 2020 20:54:03 -0600 Subject: Normalize autocmd calls in vimrc --- base/vimrc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/base/vimrc b/base/vimrc index 7351a3a..063063c 100644 --- a/base/vimrc +++ b/base/vimrc @@ -245,9 +245,7 @@ nnoremap N :call NumberToggle() " Open to last position ====---- -if has("autocmd") - au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif -endif +au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif " Custom functions ====---- @@ -270,9 +268,9 @@ endfunction au BufNewFile,BufRead * call SetLocalOptions(bufname("%")) " To move elsewhere ====---- +au Syntax json normal zR au BufNewFile,BufRead *.less set filetype=less -autocmd! BufWritePost $MYVIMRC source $MYVIMRC -autocmd! BufRead,BufNewFile *.md set filetype=markdown -autocmd! BufRead,BufNewFile *.md set spell -autocmd Syntax json normal zR -packadd! matchit +au! BufWritePost $MYVIMRC source $MYVIMRC +au! BufRead,BufNewFile *.md set filetype=markdown +au! BufRead,BufNewFile *.md set spell +pa! matchit -- cgit v1.2.3-70-g09d2