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

cs command doesn't work when delimiter doesn't have whitespace on the outside

Open RyanVerhey opened this issue 8 years ago • 1 comments

I am running into issues when running the cs command when the delimiter pair does not have whitespace on the outside, like with a ruby method definition:

def some_method(parens_to_be_changed)
  # some code
end

When running cs(, so before I can type the character to replace the (, it removes all text on that line before the cursor, so if the cursor was after the word parens, the result would look like this (and it is put in insert mode):

_to_be_changed)
  # some code
end

A similar thing happens with square brackets: array[0] -> 0]

This doesn't seem to happen with ds.

Additionally, after several unsuccessful attempts, when trying to cs again Atom becomes unresponsive, even in a situation where it should work.

RyanVerhey avatar Mar 29 '16 14:03 RyanVerhey

I am seeing unresponsiveness anytime I attempt to us cs (change surround).

pho3nixf1re avatar Apr 05 '16 19:04 pho3nixf1re