2 ms·
>learn vim After starting the (neo)vim tutorial, all I could think about was if people who "learned" vim never learned how to edit text in a normal text/code e
by AlienRobot 3y ago
>learn vim
After starting the (neo)vim tutorial, all I could think about was if people who "learned" vim never learned how to edit text in a normal text/code editor.
And I don't mean this in an inflammatory way. I mean:
hjkl = Arrow keys
b = Ctrl + Left
w = Ctrl + Right
df<space> = Ctrl + Delete
$d = Shift + End, Delete
dd = Home, Shift + End, Delete
2 = just press the keyboard command twice??
ddp = Alt + Down
ddkP = Alt + Up
The more I read the tutorial the more I felt like... do you not have arrow keys? I mean this literally. Is your keyboard just esc to f12 and there are no arrows or the numpad and it just ends there?
I do understand some good points of vim, like how explicit it is. There are many code editors/IDEs out there and sometimes how they treat Ctrl+Left/Right has subtle differences, e.g. ending the "word" in "-" or "_" or stopping before or after spaces. But most of this stuff is (or at least should be) configurable. But that's about it.
I mean how do you even use the numbers? Who looks at code and says "no, this should be exactly 8 lines below this one." I just Alt + Down until it's right. I'd spend more time trying to write the command right than I'd spend just pressing the keys multiple times.
- nequo 3y agoThe bindings you mention are useful but unfortunately there are no CUA bindings for things like dt/ Delete text to the next slash. di( Delete text inside parentheses. vi{y Select and copy code inside braces. ]] Jump to the next function. )) Jump to the next sentence. These are some of the things that make Vim/Evil stick for many folks once they begin using it in earnest.
- jzm2k 3y ago>I mean how do you even use the numbers? Who looks at code and says "no, this should be exactly 8 lines below this one." I just Alt + Down until it's right. I'd spend more time trying to write the command right than I'd spend just pressing the keys multiple times. With relative line numbers it's really easy actually. Typing dd7jp takes less effort than pressing alt + down multiple times and I have hard time believing you'd be make this argument if you were comfortable with modal editing. In fact, none of the alternatives you listed seem attractive if you're accustomed to modal editing. How is Home, Shift + End, Delete a good alternative to dd? So much movement to do a simple operation. I would highly recommend you giving it an honest try and if it doesn't work, you can always go back to editing the traditional way but once it clicks, "the old" way feels super awkward.