From 6a4888e3f538d2e60e5bcb49fbe5077717e6b306 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sun, 3 Apr 2022 22:26:15 +0300 Subject: [PATCH] refac(prog/nvim): use short version for autocmd ... and augroup --- programs/nvim/init.vim | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/programs/nvim/init.vim b/programs/nvim/init.vim index ebdc8ad..4fd119e 100644 --- a/programs/nvim/init.vim +++ b/programs/nvim/init.vim @@ -29,17 +29,17 @@ nnoremap sv :source $MYVIMRC " }}} " Markdown file settings {{{ -augroup filetype_md - autocmd! - autocmd FileType markdown iabbrev @@ dmitriy@ideascup.me -augroup END +aug filetype_md + au! + au FileType markdown iabbrev @@ dmitriy@ideascup.me +aug END " }}} " Vimscript file settings {{{ -augroup filetype_vim - autocmd! - autocmd FileType vim setlocal foldmethod=marker foldcolumn=1 foldlevelstart=0 -augroup END +aug filetype_vim + au! + au FileType vim setlocal foldmethod=marker foldcolumn=1 foldlevelstart=0 +aug END " }}} " Plugins {{{ @@ -74,10 +74,10 @@ let g:sql_type_default = 'pgsql' " Plugin: NeoFormat {{{ let g:neoformat_try_node_exe = 1 -augroup fmt - autocmd! - autocmd BufWritePre javascript,typescript,rust undojoin | Neoformat -augroup END +aug fmt + au! + au BufWritePre javascript,typescript,rust undojoin | Neoformat +aug END " }}} " Plugin: NerdTree {{{ @@ -126,11 +126,11 @@ function! s:on_lsp_buffer_enabled() abort " refer to doc to add more commands endfunction -augroup lsp_install +aug lsp_install au! " call s:on_lsp_buffer_enabled only for languages that has the server registered. - autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() -augroup END + au User lsp_buffer_enabled call s:on_lsp_buffer_enabled() +aug END " }}} " Theme {{{