mirror of
https://github.com/tpope/vim-surround.git
synced 2026-09-10 07:16:17 -04:00
feat: latext macro
This commit is contained in:
parent
3d188ed211
commit
2d16cd8da4
|
|
@ -231,6 +231,17 @@ function! s:wrap(string,char,type,removed,special)
|
|||
let after = ' ' . after
|
||||
endif
|
||||
endif
|
||||
elseif newchar ==# 'm' || newchar ==# 'M'
|
||||
let fnc = input('macro: ')
|
||||
if fnc != ""
|
||||
let s:input = fnc."\<CR>"
|
||||
let before = substitute(fnc,'{$','','').'{'
|
||||
let after = '}'
|
||||
if newchar ==# 'M'
|
||||
let before .= ' '
|
||||
let after = ' ' . after
|
||||
endif
|
||||
endif
|
||||
elseif newchar ==# "\<C-F>"
|
||||
let fnc = input('function: ')
|
||||
let s:input = fnc."\<CR>"
|
||||
|
|
|
|||
Loading…
Reference in a new issue