Skip to content

Commit 772ab95

Browse files
committed
Merge pull request #163 from kiryph/feature-repeat-late
Add repeat.vim support to surround with LaTeX environment 'ys<>l'
2 parents ec579a5 + 605c12d commit 772ab95

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugin/surround.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,11 @@ function! s:wrap(string,char,type,removed,special)
212212
elseif newchar ==# 'l' || newchar == '\'
213213
" LaTeX
214214
let env = input('\begin{')
215-
let env = '{' . env
216-
let env .= s:closematch(env)
217-
echo '\begin'.env
218215
if env != ""
216+
let s:input = env."\<CR>"
217+
let env = '{' . env
218+
let env .= s:closematch(env)
219+
echo '\begin'.env
219220
let before = '\begin'.env
220221
let after = '\end'.matchstr(env,'[^}]*').'}'
221222
endif

0 commit comments

Comments
 (0)