Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Macvim's text selection to not include character under cursor

Tags:

vim

macvim

Using macvim, when I copy a text selection, it always includes the character under the cursor.

For example, if the cursor is at the far left and I press shift-down arrow, it selects the entire line plus the first character of the next line (since the cursor is sitting over the next line's first character).

Is there a way to configure macvim to not include the cursor character in text selections?

like image 494
Steve Kuo Avatar asked Mar 06 '10 01:03

Steve Kuo


1 Answers

Take a look at the selection option. By default it's set to inclusive, but you can change it to exclusive to make text selections act the way you want:

:set selection=exclusive

You can also set it to exclusive with the behave command:

:behave mswin

This also sets several other options, however, which may or may not be what you want. See the Vim help for the specifics.

:help :behave

:help 'selection'
like image 96
Bill Odom Avatar answered Nov 03 '22 02:11

Bill Odom