aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2020-06-13 20:54:03 -0600
committerAdam Hovorka <[email protected]>2020-06-13 20:54:03 -0600
commit20bbb154467e63ce6fbae48c13fac9d3fba95587 (patch)
tree53d5024d203b65ddd2503a2bf2e059d26a41a820
parentd8dd2f1df875ca8cf3a35d463ba00038d87841ac (diff)
Normalize autocmd calls in vimrc
-rw-r--r--base/vimrc14
1 files 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 <leader>N :call NumberToggle()<cr>
" 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