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.

I want to use _ as my terminal cursor (konsole/gnome-terminal).

However because of this, using visual block selection in Vim becomes a problem, as Vim does not highlight the character under cursor as the rest of a selection. (while this character is a part of a visual block selection itself).

Anyone knows how to force Vim to select the last character of the selection (the character under cursor) as a part of visual selection block?

share|improve this question

1 Answer 1

Vim has certain limitations with the visual display, especially in the terminal. Even if it were possible, you'd probably have to modify Vim's source code for it. Therefore, only some ideas:

  • In a multi-line block selection, the selection end is only obscured in the current line, not the ones above. So, you should still be able to visually parse the entire block as such. (Only exception: visual blocks extending to end-of-lines.) I'd imagine the real issue is with characterwise selections.
  • You can :set selection=exclusive, where the position before the cursor marks the end of the selection. It's a different paradigm, sometimes has differing behavior, but you may prefer that.
  • When you've :set ruler, you'll see the current cursor position and size of the visual selection as numbers in the bottom right corner. This can be helpful to ensure you've selected the right area.
share|improve this answer
    
Thanks. Unfortunately none of these is a solution for me. I'd prefer to just make patch to Vim, as I compile my own Vim version anyway. I'll wait some time and make sure if none has any better idea how to handle this. –  dpc.ucore.info Feb 18 '13 at 14:33
    
Understood. It may make sense to ask around on the vim_dev mailing list; they may have additional insights, or might be able to tell how difficult such a change would be. –  Ingo Karkat Feb 18 '13 at 15:12

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.