9 Aug 2010

selecting text in vim from an xterm

I have line numbers turned on in vim. this makes selecting text awkward, since the line numbers are selected and copied too.

Fortunately, there is a helpful vimrc setting as long as you are using some sort of xterm:

set number
set mouse=a
Left-clicking and dragging in a terminal in which vim is running will result in text a only selection.