From 605c12d7d24dd3784628c52eecdbcd00428e2527 Mon Sep 17 00:00:00 2001 From: kiryph Date: Wed, 25 Feb 2015 21:28:28 +0100 Subject: [PATCH] Add repeat.vim support to surround with LaTeX environment 'ys<>l' --- plugin/surround.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/surround.vim b/plugin/surround.vim index 34d20aa..82b016e 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -212,10 +212,11 @@ function! s:wrap(string,char,type,removed,special) elseif newchar ==# 'l' || newchar == '\' " LaTeX let env = input('\begin{') - let env = '{' . env - let env .= s:closematch(env) - echo '\begin'.env if env != "" + let s:input = env."\" + let env = '{' . env + let env .= s:closematch(env) + echo '\begin'.env let before = '\begin'.env let after = '\end'.matchstr(env,'[^}]*').'}' endif