2 execute printf('cnoreabbrev <expr> %s (getcmdtype()==":" && getcmdline()=="%s") ? "%s" : "%s"', a:abbrev, 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 formatoptions-=a | echo '-a' |
8 else |
8 else |
9 setl fo+=a | echo '+a' |
9 setl formatoptions+=a | echo '+a' |
10 endif |
10 endif |
11 endfunc |
11 endfunc |
12 |
12 |
13 func! vimrc#Ltag(term) abort |
13 func! vimrc#Ltag(term) abort |
14 exe "ltag " . a:term |
14 exe "ltag " . a:term |