diff --git a/import/surround.vim b/import/surround.vim index 224e4b1..8e757a7 100644 --- a/import/surround.vim +++ b/import/surround.vim @@ -502,6 +502,8 @@ export def DoSurround(value: string = null_string, new_value: string = null_stri execute 'normal! l' endif execute "normal! \(surround-d)t" .. char + elseif char ==# 'f' + execute "normal! \(surround-d)i(" .. char else execute "normal! \(surround-d)" .. strcount .. 'i' .. char endif @@ -548,7 +550,14 @@ export def DoSurround(value: string = null_string, new_value: string = null_stri else # One character backwards search('\m.', 'bW') - execute "normal! \(surround-d)a" .. char + + if char ==# 'f' + execute "normal! \(surround-d)a(" .. char + execute 'normal! b\(surround-d)w' + original = getreg('"') + else + execute "normal! \(surround-d)a" .. char + endif endif var removed = getreg('"')