vim-surround icon indicating copy to clipboard operation
vim-surround copied to clipboard

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

Open peterszerzo opened this issue 3 years ago • 0 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.

peterszerzo avatar Sep 01 '22 07:09 peterszerzo