4

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?

1 Answer 1

3

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.
2
  • 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.pw
    Feb 18, 2013 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. Feb 18, 2013 at 15:12

You must log in to answer this question.

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