retext icon indicating copy to clipboard operation
retext copied to clipboard

Feature request: Toggle line numbers via FakeVim

Open cognifloyd opened this issue 8 years ago • 1 comments

I would like to toggle line numbers without using the preferences dialog. I want to type :set nu or :set number to turn line numbers on or :set nonu / :set nonumber to turn them off.

I figured it wasn't implemented yet in FakeVim (hluk/FakeVim#37), so I submitted a feature request there, but hluk says that you can already do something like this:

if cmd.matches('se', 'set'):
    if cmd.args == 'number' or cmd.args == 'nu':
        ...
    elif cmd.args == 'nonumber' or cmd.args == 'nonu':
        ...
    else:
        return false # Return false so FakeVim can handle other options.

I would also love to see relative line numbers (:set rnu & :set nornu), but I'll file a separate request for that. edit: I filed #265 about relative line numbers

cognifloyd avatar Feb 27 '17 21:02 cognifloyd

I am not using the FakeVim mode myself. Maybe you can submit a pull request for this?

mitya57 avatar Mar 15 '17 17:03 mitya57