Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In gvim, if I click on a character and drag the mouse backwards in the text, I get a highlighted text selection. However, the actual character I click on, which I expect to be the last character in my selection, is not included. If I click on a character and drag the mouse forwards, I don't have a problem. Is there any way to make gvim include the last character when selecting by dragging backwards, just as in any any other text editor, such as Notepad? Confirmation that others see the same behaviour would also be useful.

I appreciate one solution would be 'drag forwards not backwards'. However, this habit is highly ingrained - I don't even know I'm doing it until some time later I notice I have cut and pasted a block without the last character. I'd rather change the behaviour of the software.

I am running gvim 7.3 on Windows 7, 64-bit.

share|improve this question
up vote 4 down vote accepted

Please try:

:set sel=inclusive
share|improve this answer
1  
That does exactly what I want. Thank-you!! – Crosbie Jan 31 '12 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .