开发者

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

开发者 https://www.devze.com 2023-03-04 17:51 出处:网络
Does anyone know a textmate equivalent of VIM\'s ci (cha开发者_如何转开发nge inside) command? I like this VIM feature but generally prefer TextMate. I\'d like to be able to do things like change insid

Does anyone know a textmate equivalent of VIM's ci (cha开发者_如何转开发nge 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.


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>.

0

精彩评论

暂无评论...
验证码 换一张
取 消