diff --git a/vimrc b/vimrc index abad5dc..fdfa9ed 100644 --- a/vimrc +++ b/vimrc @@ -161,6 +161,8 @@ nnoremap ry diw"0P inoremap jk +nnoremap A :call Checksemicolon() + nnoremap co :!clear; nnoremap gs :!clear; git status nnoremap gd :!clear; git diff @@ -354,6 +356,15 @@ augroup END " #functions +function! Checksemicolon() + :normal $ + if getline('.')[col('.')-1] == ';' + :startinsert + else + :startinsert! + endif +endfunction + " get name of syntax item function! SyntaxItem() return synIDattr(synID(line('.'),col('.'),1),'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' )