Last week, I turned off
'number' and have been using only
'relativenumber', plus a line/column count in my status line. I don't really look at line numbers that much.
But now I've had a radical idea.
I'd like to turn off numbering completely, and only turn it (
'relativenumber') back on
- in visual mode, so I can jump around quickly
- on the ex command-line, so I can build ranges
- in operator-pending mode, so I can provide motions like
I can handle the command-line stuff with
CmdwinEnter (and corresponding exits).
Visual mode doesn't seem to have a
VisualEnter event (unlike Insert mode), so I would probably have to map
<C-v> in normal mode (also
But I don't want to remap every operator—it's simply not practical.
Is there a way to detect operator-pending mode, trigger some commands, and either resume mode, or use
feedkeys() to re-trigger it? Or is this attempt ill-fated?