tpope / vim-surround

surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease

Home Page:https://www.vim.org/scripts/script.php?script_id=1697

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot replace in an escape (`\{ *** }`) pattern

peterszerzo opened this issue · comments

When using this plugin working on Elm code, pressing ds{ in normal mode on following pattern (cursor position indicated with a ):

List.map
  (\{ fieldOne, █ fieldTwo } ->
      { fieldOne = fieldOne ++ "s"
      , fieldTwo = fieldTwo ++ "y"
      }
  )
  items

results in

List.map
  (\{ fieldOne, fieldTwo } ->
      {}
  )
  items

as in it removes content between the following curly bracket pair, not the one around the cursor. The only distinguishing factor between this case and others I usually encounter is the preceding \ character.