Re: Visual selection via :global

2020-07-24 Thread Manas
On Thu, Jul 23, 2020 at 08:18:23PM -0500, Tim Chase wrote: > The ex "y" command yanks and can take an optional register to yank > to. By default, your > > :g/^-/normal yy > > (using the normal-mode) would be the same as ex-mode "y" command: > > :g/^-/y > > which yanks, overwriting the

Re: Visual selection via :global

2020-07-23 Thread Tim Chase
On 2020-07-24 05:36, Manas wrote: > On Thu, Jul 23, 2020 at 06:40:17PM -0500, Tim Chase wrote: > > :let @a='' | g/^-/y A > > > It worked like a charm. Apparently, the right command was `:g/^-/y > A` instead of `:g/^-/normal yy`. Although I am not able understand > the use of `A` after `y`.

Re: Visual selection via :global

2020-07-23 Thread Manas
Sorry for wrong CC'ed on previous mail! -- Manas CSAM Undergraduate | 2022 IIIT-Delhi, India -- -- 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 --- You

Re: Visual selection via :global

2020-07-23 Thread Manas
On Thu, Jul 23, 2020 at 06:40:17PM -0500, Tim Chase wrote: > On 2020-07-24 04:43, Manas wrote: > > > > I want to yank those lines in order to paste somewhere else. In this > > particular case, I wanted to send it to someone. > > Ah, the typical idiom here is to empty a register and then >

Re: Visual selection via :global

2020-07-23 Thread Tim Chase
On 2020-07-24 04:43, Manas wrote: > On Thu, Jul 23, 2020 at 05:57:51PM -0500, Tim Chase wrote: >> On 2020-07-24 03:48, Manas wrote: >>> Hi folks, I have a markdown file containing a couple of >>> headings and some pointers as shown below. >>> >>> ``` >>> # Heading 1 >>> - pointer 1 >>> -

Re: Visual selection via :global

2020-07-23 Thread Manas
On Thu, Jul 23, 2020 at 05:57:51PM -0500, Tim Chase wrote: > On 2020-07-24 03:48, Manas wrote: > > Hi folks, I have a markdown file containing a couple of headings and > > some pointers as shown below. > > > > ``` > > # Heading 1 > > - pointer 1 > > - pointer 2 > > - pointer 3 > > > > ## Heading

Re: Visual selection via :global

2020-07-23 Thread Tim Chase
On 2020-07-24 03:48, Manas wrote: > Hi folks, I have a markdown file containing a couple of headings and > some pointers as shown below. > > ``` > # Heading 1 > - pointer 1 > - pointer 2 > - pointer 3 > > ## Heading 2 > - pointer 4 > - pointer 5 > ``` > > I wanted to visual select all pointers

Re: Visual selection via :global

2020-07-23 Thread Manas
Hi folks, I have a markdown file containing a couple of headings and some pointers as shown below. ``` # Heading 1 - pointer 1 - pointer 2 - pointer 3 ## Heading 2 - pointer 4 - pointer 5 ``` I wanted to visual select all pointers only. So what I did was `:g/^-/normal V` but it only selects the