From fa433e0b7330753688f715f3be5d10dc480f20e5 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 26 Jul 2014 12:39:53 -0400 Subject: [PATCH] Work around 'nomagic' Documentation explicitly advises against setting this option, but this particular problem is easy enough to work around. Closes #90. --- plugin/surround.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/surround.vim b/plugin/surround.vim index 18a4935..148a5c9 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -416,7 +416,7 @@ function! s:dosurround(...) " {{{1 exe 'norm! df'.char else " One character backwards - call search('.','bW') + call search('\m.', 'bW') exe "norm! da".char endif let removed = getreg('"')