DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

ddreggors's picture

Unregistered

Feeds

aliases

  • ddreggors

ddreggors

7 months ago

in Copy and paste text with vi or vim | UNIX | Tech-Recipes on Tech-Recipes
Sorry one change...

CTRL-V is Visual Block Mode
simply use the lowercase "v" to enter visual mode and no need to do the "SHIFT-$" (should be SHIFT-4 or $) as mentioned above. So that process now beomes:

go to the line you wish to start yanking/cutting
v (enable visual mode)
<down arrow> (select the lines you wish to yank/cut)
or
<right/left arrow> (select characters/words in a line)
d (cut lines) or y (yank/copy)

now just use 'p' or 'P' as needed to paste below or above cursor!

7 months ago

in Copy and paste text with vi or vim | UNIX | Tech-Recipes on Tech-Recipes
Another nice trick is to use Visual Mode...

go to the line you wish to start yanking/cutting
CTRL-V (enable visual mode)
SHIFT-$ (select to end of line)
<down arrow> (select the lines you wish to yank/cut)
d (cut lines) or y (yank/copy)

now just use 'p' or 'P' as needed to paste below or above cursor!

This is the same as fuzzy's except it allows you to "SEE" what you are yanking.
1 reply
ddreggors Sorry one change...

CTRL-V is Visual Block Mode
simply use the lowercase "v" to enter visual mode and no need to do the "SHIFT-$" (should be SHIFT-4 or $) as mentioned above. So that process now beomes:

go to the line you wish to start yanking/cutting
v (enable visual mode)
<down arrow> (select the lines you wish to yank/cut)
or
<right/left arrow> (select characters/words in a line)
d (cut lines) or y (yank/copy)

now just use 'p' or 'P' as needed to paste below or above cursor!
Returning? Login