.vim/autoload/vimrc.vim

changeset 632
9a87ce42aa3c
parent 631
8e07c29f2672
child 640
f8985ae54969
equal deleted inserted replaced
631:8e07c29f2672 632:9a87ce42aa3c
1 func! vimrc#CommandAlias(abbrev, expand) abort 1 func! vimrc#CommandAlias(abbrev, expand) abort
2 execute printf('cnoreabbrev <expr> %s (getcmdtype()==":" && getcmdpos()==1) ? "%s" : "%s"', a:abbrev, a:expand, a:abbrev) 2 execute printf('cnoreabbrev <expr> %s (getcmdtype()==":" && getcmdline()=="%s") ? "%s" : "%s"', a:abbrev, a:abbrev, a:expand, a:abbrev)
3 endfunc 3 endfunc
4 4
5 func! vimrc#AutoFmtToggle() abort 5 func! vimrc#AutoFmtToggle() abort
6 if &formatoptions =~ 'a' 6 if &formatoptions =~ 'a'
7 setl fo-=a | echo '-a' 7 setl fo-=a | echo '-a'

mercurial