Cory Schires
Cory Schires

Reputation: 2176

Textmate equivalent of VIM's ci (change inside)?

Does anyone know a textmate equivalent of VIM's ci (change inside) command? I like this VIM feature but generally prefer TextMate. I'd like to be able to do things like change inside quotes or parens.

Upvotes: 1

Views: 385

Answers (1)

romainl
romainl

Reputation: 196596

You have Edit > Select > Enclosing Brackets.

There is an "experimental.tmbundle" that provides a sort-of-similar feature called "Balance Jr".

It's only equivalent to vi<something>: if you are somewhere between a pair of () it will work like vi( or like vi" if you are between a pair of "".

If I remember correctly it was very buggy, illogical and unpredictable and didn't work well with long strings or many spaces.

Vim's text-objects are very precise, if you are between a pair of "" enclosed by a pair of () you can select/delete/yank/shange exactly what you want. In a similar situation in TextMate, you are stuck and you must resort to a lot of <Right><Right><Right><Left><Left>.

Upvotes: 2

Related Questions