Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.