How to change/delete between blocks and braces using VSVIM

566 views Asked by At

I am using vsvim and I think that it is a great tool.

The only issue I have is regarding changing/deleting text between braces and parentheses doesn't seem to work.

Here some examples I have verified in gvim, but do not seem to work in vsvim:

  • di( deletes the inner (...) block where the cursor
  • da( deletes the inner (...) block where the cursor and removes the () characters too
  • ci( changes the inner (...) block where the cursor is.
  • ci{ changes inside a {}
  • ca{ changes inside a {} and removes the {} characters too

I assume these are just features that have not been added.

Can someone confirm this?

3

There are 3 answers

2
Eric Bock On BEST ANSWER

These issues are now fixed in VsVim 1.2. I tried all of your commands locally and they worked for me.

VsVim 1.2 Release Notes

2
Randy Morris On

EDIT: The developer has commented below that these features are now available as of version 1.2.

The i(/a( and i{/a{ text objects are not listed in the supported features.

Also, for the text objects that are supported there is a note at the bottom stating that there are quirks with the current implementation.

Note that the page above has not been updated since April of 2011. You may want to poke the developer and see if any of this info has changed since he is now past a 1.0 release.

0
Stephen Quan On

I don't have vsvim but I would assume there are many alternatives should do the same thing and I noticed that you don't use the '%' key in any of your example, so, here's one you can try:

  • ? { ENTER c % changes inside a {} and removes the {} characters too

i.e. use ? or / to position the cursor on { } or ( ) blocks and use % to do operations on that block.