Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "hjkl"
-
Vim is super easy, guys! You don't use arrows to navigate around the text, that's too obvious! Instead you use HJKL keys, because it goes Hup, Jleft, Kright and Ldown. You can also use B to go Beginning and E to go to End of the word, oh and W to go to the WstartOfNextWord.21
-
This is something I'm proud of about myself as a developer, which is rare.
My setup with the Alt key.
All the keys in my left hand (as in, for all the keys in my left hand region, qwerasdfzxcv)
have their Alt and AltShift combinations mapped to (almost) all the special chars related to programming.
For example:
Alt + z -> /
AltShift + z -> \
Here's me typing them in 2 seconds.
{}()_-'"/:+=<>[]|#~`\;*!
And, on my right hand, I emulate the arrow keys movement:
Alt + hjkl moves chars
AltShift + hjkl moves and selects chars
AltCtrl + hjkl moves words
AltCtrlShift + hjkl moves and selects words
Alt + n. backspaces/deletes chars
AltCtrl + n. backspaces/deletes words
And the best of them all:
Alt + space -> <return>
AltShift + space -> Shift+<return> (which does a newline in chat editors like fb messenger)
AltCtrl + Space -> Ctrl+<return> (which can do the submit in some forms, like send email in gmail)
Now, my hand sits for real on the home row and rarely moves because it's not there just for vim, but for the entire system as well.
This setup is very compliant with my little mouse use, since I use vim, and the vim extension for chrome.
I still use and need the mouse for some tasks.
Another one huge benefit is that I don't have a problem remembering where the keys are. This is a problem I can have because I go between different keyboards because of having used different keyboards: argentinian, american, japanese and now brazilian (I'm not trying to be cool, it's just a series of circumstances that led me to using different keyboards).
At the same time, this thing might have become a hinderance because it's not as easy for me going to a different keyboard.
Regarding implementations, when I used MacOS I used Karabiner, insanely clean interface.
On linux, I have to create my own mapping in X.5 -
>use atom
>move hand from home row to arrow keys to mous to home row
>start getting annoyed
>remember vim did this weird hjkl thingy I always wondered why
>discover atom vim-mode-plus
>fall in love with all the amazing things vim can apparently do5 -
Question for vim veterans:
I am fairly confident with vim. I know a couple of commands like delete line, delete under cursor, copy, paste, undo and stuff like that.
So in command mode it's hjkl to move the cursor, which is a good idea because I won't have to move my right palm to the arrow keys.
However, in insert mode, if I needed to move the cursor, I would still have to move my left palm to the esc key in order to use hjkl. Why not just use the arrow keys then?8 -
How many of you guys use vim?
How many hate it? Why?
How many haven't tried it yet?
I've been using it for a month and it feels great. Everything is fast and customisation is great and fairly easy (just vim ~/.vimrc). With a little bit of searching abilities, you can do pretty much anything you want by configuring the vimrc. And besides the initial learning courve of having no UI, it feels much more intuitive to just use the keyboard.
I used it by a necessity to edit stuff from the wls, but fuck, now I'm fucking addicted to it. Every new command I learn is a fucking drug for my hands.
I totally recommend it and personally feel a tad sad when vim gets hate. I understand jokes though. I also struggled at first to use "i" to start typing, "hjkl" to move around, and got stuck with the good ol' ":q". But it's worth it.8 -
vi keys suck, using hjkl to navigate the cursor is so unnecessarily unintuitive.
Who cares about the "muh homerow keys"15 -
Are here Vim users using the dvorak layout?
I am thinking of learning (programmer) dvorak but I am way to comfortable with Vim. I think Vim itself would not even be my primary concern since one should not use HJKL anyway. But I also have these bindings for switching tmux panes, vim splits and windows in i3, etc .
I think Dvorak would be a great opportunity to finally learn touch typing but I fear that Vim is not compatible with it.
So what is your experience with these two? Does it work? Is it worth it?2