Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim highlight characters/words/line for Copy to clipboard

Tags:

vim

I am fairly new to vim. I am trying to practice (been reading a couple of tutorials lately) but I found out I couldn't live without highlighting characters/words/lines for Copy-paste.

In Textmate, I usually SHIFT+CTRL+LeftArrowKey to highlight words and then Copy.

How do I do that in VIM?

NOTE: I have NERDTree plugin installed and mapped some keys for my own consumption.

like image 995
wenbert Avatar asked Feb 03 '23 10:02

wenbert


1 Answers

Give a look to the Vim Visual Mode.

The Shift+Ctrl+LeftArrowKey for word highlighting can be replaced easily for vw or vb.

Highlighting lines :

V to enter in Visual Line mode, then you can move with j,k, Ctrl-U, Ctrl-D, etc...

The Visual Mode is very powerful and useful.

Also, give a look to my answer to this question.

like image 64
Christian C. Salvadó Avatar answered Mar 28 '23 23:03

Christian C. Salvadó