gepoch / vim-surround

Surround for the Atom editor.
MIT License
52 stars 2 forks source link

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

Open RyanVerhey opened 8 years ago

RyanVerhey commented 8 years ago

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.

pho3nixf1re commented 8 years ago

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