When I enter in visual-mode and I want to delete a block of text before the newline character (only visible if selected/highlighted in visual-mode), I accidentally always select the newline character also, making the line below to move up.

Is there a way to make the visual-mode cursor to discard the newline selection ?

I took a look into the help but I think I did not found anything useful for my problem..

I could use the set list option so to see the newline character (red $)

enter image description here

But I don't want to use the set list neither accidentally select the newline character(0xa).


I can achieve this behavior using evim, but of course I don't want to use evim since I loose other modes. If this is possible in evim, I understand it's possible also in gvim.

  • How do you "accidentally" select the carriage return?
    – janos
    Commented Dec 16, 2017 at 21:20
  • Yes sorry I get totally confused. It's late night here...
    – xyx
    Commented Dec 16, 2017 at 21:26
  • I suppose you delete the selected text using d? How about if you delete using x ?
    – janos
    Commented Dec 16, 2017 at 21:30
  • Using d or x behaves the same.
    – xyx
    Commented Dec 16, 2017 at 21:32

1 Answer 1


I solved using

:set selection=exclusive

This is the option that controls this behavior.
For more info check help selection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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