tags:

views:

614

answers:

2

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.

+5  A: 

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.

CMS
Thank you so much for this. On a sidenote, is it possible to have Vim (w/ NERDTree) to access files via FTP? I am still researching on this and thought asking here would also help.
wenbert
+2  A: 

Hello,

I am using VIM on Windows right now and in my .vimrc I have the following:

if has("win32")
   set clipboard=unnamed "always copy into clipboard
   set go+=a " when I am selecting anything, it is autamtically copied 
             " into clipboard
endif

I don't have any Linux machine right now with me, but I think, that it should work on Linux too. (maybe it will require some hacking)

Edit

There are lots of usefull tips about yanking(copying) here: Vim Wikia

zeroDivisible