t9md / atom-vim-mode-plus-ex-mode

Experiment to implement ex-mode for vim-mode-plus
https://atom.io/packages/vim-mode-plus-ex-mode
MIT License
30 stars 11 forks source link

Add support for moving to relative line numbers #18

Closed gabeboning closed 7 years ago

gabeboning commented 7 years ago

I like having relative line numbers (https://atom.io/packages/relative-numbers) displayed in my editor, and being able to jump to lines by a relative value goes hand in hand for my workflow. This PR adds the ability to go to lines by a relative value from within ex-mode.

:+12 will move forward 12 lines, :-2 back two lines.

t9md commented 7 years ago

Thanks, just curious 1 2 j is faster than :12, 2 k is for :-2. Why someone use : command for that?

gabeboning commented 7 years ago

Relative line numbers are more useful for range specification, which is something I'll get around to implementing eventually. But give how frequently I use those (in actual vim), I'll often end up jumping to the line because I realize there is an edit that needs to be made. So having already written out the start of the range relatively, it's only one key stroke to go there

t9md commented 7 years ago

My question is simple. Why you choose keystroke :+12 when you can type 12j? Is this because of muscle memory? I'm not expressing opposition to implement :+12 feature, it's good to have. But just I can't understand the motivation to type :+12 where I have shorter 12j keystroke.

t9md commented 7 years ago

released as v0.7.1. thanks!