1

Re: special text-block motions

I have been trying to follow the instructions on the documentation page.  For special motions to quote text or surround it in []'s.

It does not seem to be working for me.

I enter visual mode select the text I want then press i' or a' and nothing happens.  is there something that needs to be done to get these motions to work correctly?

I'm referencing :

special text-block motions: these motions act especially, as they determine not only the end but also the beginning of the acted upon region. They cannot be entered as regular motions in normal mode, as they start with 'i' or 'a' which are valid commands - they can only be used as arguments to operators or in visual mode. They fully determine the region on which to operate when used as operator arguments, and they extend the current selection in visual mode. The 'inner' version does not pick spaces afterwards, while the 'a' version does:

iw or aw ("inner word"/"a word"): "word" currently under the cursor
iW or aW: likewise with a "WORD"
is or as: likewise with a sentence (see '(' and ')')
ip or ap: likewise with a paragraph (see '{' and '}')
i) or a): (also works with '(') ) parentheses delimited block
i] or a]: (also works with '[') ) square bracket delimited block
i> or a>: (also works with '<') ) angle-bracket delimited block
i' or a': single-quote delimited block, limited to the current line, ignores '\' escaped quotes, counts quotes from start-of-line if done from an ambiguous quote
i" or a": double-quote delimited block, limited to the current line, ignores '\' escaped quotes, counts quotes from start-of-line if done from an ambiguous quote

2

Re: special text-block motions

Looks like I miss understood what this feature is for. .... , and they extend the current selection in visual mode. ...

After re reading the above line I now understand that it is used for selecting text or operating on text.

Not for surrounding text with quotes or braces.

thanks.

3

Re: special text-block motions

Hi Netikular, apologies for not coming back to you earlier. Indeed, vim text object motions are used in combinations such as "diw", which deletes the word where the cursor is. There is a SurroundWith plug-in for vim which does what you want, but ViEmu doesn't support vim plug-ins. I suggest looking at VS's own implementation of this functionality (in VS2005+), and configuring VS keybindings for that.