What is a" supposed to do in visual mode?

15 views
Skip to first unread message

skeept

unread,
Jan 14, 2013, 3:49:51 PM1/14/13
to vim...@googlegroups.com
Hi I was reading some documentation and I came across

|v_aquote| a" extend highlighted area with a double

In my case I start visual mode and type a" but nothing seems to happen. Is this supposed to surround the visual selection with "?

I tried this with vim -u NONE --noplugins.

Regards,
Jorge

stosss

unread,
Jan 14, 2013, 3:55:01 PM1/14/13
to vim...@googlegroups.com
It works when your cursor is between quotes. It does a visual
selection of everything between the quotes. See :help a"

stosss

unread,
Jan 14, 2013, 3:57:27 PM1/14/13
to vim...@googlegroups.com
Correction it works when the cursor is on a quote and selects the
quote and matching quote with all the text between them.

skeept

unread,
Jan 14, 2013, 4:06:21 PM1/14/13
to vim...@googlegroups.com
On Monday, January 14, 2013 3:57:27 PM UTC-5, Jack Gates wrote:
> On Mon, Jan 14, 2013 at 3:55 PM, stosss wrote:

>
> > On Mon, Jan 14, 2013 at 3:49 PM, skeept < wrote:
>
> >> Hi I was reading some documentation and I came across
>
> >>
>
> >> |v_aquote| a" extend highlighted area with a double
>
> >>
>
> >> In my case I start visual mode and type a" but nothing seems to happen. Is this supposed to surround the visual selection with "?
>
> >>
>
> >> I tried this with vim -u NONE --noplugins.
>
> >>
>
> >
>
> > It works when your cursor is between quotes. It does a visual
>
> > selection of everything between the quotes. See :help a"
>
>
>
> Correction it works when the cursor is on a quote and selects the
>
> quote and matching quote with all the text between them.


Thanks, that is obvious now.
Somehow I was reading extend as "add quotes around the visual selection"

Regards,
Jorge

stosss

unread,
Jan 14, 2013, 4:08:32 PM1/14/13
to vim...@googlegroups.com
The surround plugin does that.

Chris Schneider

unread,
Jan 14, 2013, 4:22:28 PM1/14/13
to vim...@googlegroups.com
I actually cover this about 2/3rds the way through my VimDrills screencast for this week (http://www.vimdrills.com/blog/drill-3-text-objects).  Basically, while in visual mode, you can keep repeating text-objects to expand out your selected area.

So   va"  (visual all quote), then you can tack on  a) (all paren) to expand outwards further.





--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply all
Reply to author
Forward
0 new messages