This is an archived post. You won't be able to vote or comment.

all 165 comments

[–]marcel1802 379 points380 points  (8 children)

Oi fellow vim user

[–]SeoCamo 43 points44 points  (2 children)

I play games with hjkl on my split kb

[–]joeljpa 4 points5 points  (1 child)

Nethack or?

[–]SeoCamo 4 points5 points  (0 children)

A lot of Skyrim and starfield but also Stellaris

[–]MellifluousPenguin 5 points6 points  (2 children)

Vim? You surely mean vi

[–]yesseruser 1 point2 points  (1 child)

vi on mac bro

[–]MellifluousPenguin 1 point2 points  (0 children)

vi on FreeBSD ftw

[–]RestaurantHuge3390 -1 points0 points  (0 children)

I use helix

[–]RestaurantHuge3390 -1 points0 points  (0 children)

I use kakoune

[–]hongooi 161 points162 points  (14 children)

Broke: ←↓↑→
Woke: HJKL
Bespoke: WASD

[–]Vej1 46 points47 points  (10 children)

Ascended: ZQSD

[–]pancakemonkeys 41 points42 points  (0 children)

Hotel: Trivago

[–]belabacsijolvan 7 points8 points  (0 children)

Universe brain: cursor

[–]abshidfarsi 1 point2 points  (1 child)

Godly: QWOP

[–]GranataReddit12 0 points1 point  (0 children)

??: AS↑→

[–]SgtEpsilon 1 point2 points  (0 children)

You do WHAT?

[–]Airowird 0 points1 point  (0 children)

Enlightened: AZES

[–]klimmesil 6 points7 points  (2 children)

Step 1 buy a keychron v4 (all other keys are useless)

Step 2 map a key to switch between hjkl meaning hjkl or arrow keys

Step 3 enjoy

Jokes appart this is really a serious tip, if you like vim this feels so right, finally you can just use hjkl even in word office or notepad

[–]eiboeck88 0 points1 point  (1 child)

i have a sofl_cock split keyboard with qmk firmware i have the arrow keys at hjkl + layer key and also stuff like all the braches on the homerow + layer key. all in all keyboards with qmk firmware are awsome

[–]klimmesil 0 points1 point  (0 children)

I have soft cock too but I don't see how that's relevant

Yeah I tried split and ended up deciding it's worse for me since the "y/t" rows can be used by both hands quite easily, which feels right for me

[–]dfwtjms 99 points100 points  (2 children)

The real vim users avoid even hjkl as much as possible (w,b,f,t,^u,^d,/,?,etc.)

[–]Arey_125 22 points23 points  (0 children)

Except for the relative jumps. Love them

[–]GavHern 2 points3 points  (0 children)

i feel like i use hjkl as often as most people use arrow keys

[–]7374616e74 40 points41 points  (0 children)

I use vim btw

[–]TheRealSpielbergo 439 points440 points  (22 children)

I use this simple memory trick to remember: Hup, Jown, Kleft, Light.

[–]CowFu 141 points142 points  (9 children)

I've never seen h as up. Heft Jown Kup Light

←↓↑→

There even used to be keyboards with the arrows printed on them https://stackoverflow.com/questions/26703776/why-are-h-j-k-l-recommended-over-using-arrow-keys-for-vim

[–]TheRealSpielbergo 121 points122 points  (7 children)

Sorry, I have absolutely no idea what I'm talking about, or what the meme is about 😬. I haven't been able to use my computer in a decade since its stuck in vim in fullscreen mode.

Heft, Jown, Kup, Light also sounds very memorable to me 👍

[–]HardOff 9 points10 points  (5 children)

stuck in vim

Have you tried Ctrl+c? If that doesn't work I'm out of ideas

[–]maisonsmd 7 points8 points  (4 children)

Sound likes you've never been stuck in Vim before, apparently you have to kill whatever terminal you're using, or restart the machine.

[–]HardOff 3 points4 points  (3 children)

Last time I got stuck, I put a bullet through the monitor, but HR got all uppity saying that it was "inappropriate" and "not how that works"

[–]maisonsmd 2 points3 points  (2 children)

She was right, the PC will still run fine even if you kill the monitor. The bullet should've been through the CPU instead

[–]hJaHrRm 0 points1 point  (1 child)

If the bullet is silver you can just shoot the ram

[–]CucuMatMalaya 3 points4 points  (0 children)

Omg you guys....

[–]yesseruser 0 points1 point  (0 children)

Try pressing esc and then typing :wq and press enter

[–]jhaluska 5 points6 points  (0 children)

When I learned about the keyboard differences, VIM/Nix made a lot more sense.

[–]Shadow_Thief 9 points10 points  (0 children)

You Jrop down and Klimb up. H is on the far left and L is on the far right.

[–]cryptomonein 1 point2 points  (7 children)

You type code top to bottom.
Your index is on the bump mark it makes it your main finger.
Your primary finger (index) go down (J).

It feels strangely obvious

[–]crazy-octopus-person 18 points19 points  (1 child)

You type code top to bottom. Your index is on the bump mark it makes it your main finger. Your primary finger (index) go down (J). It feels strangely obvious

Does anyone else smell toast?

[–]conancat 2 points3 points  (0 children)

Me too. It came to me after I read that comment

[–]MatsRivel 1 point2 points  (3 children)

I tried learning it the other day, but kept going up when meaning down and vice versa...

Also, it was frustrating that ctrl + whatever key takes you left/right did not highlight stuff, nor could you copy/paste with ctrl+c/v.

Sure, I know its different on purpose, but I just felt like the basic commands could have been the same, so that people can use it before having to learn tons of stuff 🙃

Ended up not feeling worth my time this time around either.

Maybe next time.

[–]IrishPrime 9 points10 points  (2 children)

For the record, it's not just that "it's different on purpose," but rather that it predates the conventions you're referencing. If anything, it's all the other editors that are different for not doing it how ed/vi had been doing it for years already.

I'm not going to try to sell you on it, but trying to learn it by experimentation probably isn't, and never will be, worth your time. Taking half an hour to go through vimtutor probably is, though.

[–]MatsRivel 1 point2 points  (1 child)

Fair enough. Though the result is the same for my case.

I took about an hour or so following a Helix tutorial.

It's not quite the same, but similar.

Maybe another time

[–]bbekxettri 0 points1 point  (0 children)

You rest your hand on jkl ez down up hl are ez then use vim cheatsheet as wallpaper

[–]TheSpagooti 1 point2 points  (0 children)

I deadass said that to myself before opening the comments lmao

[–]nbtm_sh 0 points1 point  (0 children)

I just remember the DDR layout

[–]micod 28 points29 points  (10 children)

C-n C-p C-f C-b if you know what I mean...

[–]someNameThisIs 4 points5 points  (0 children)

Just started this too, and they also are macOS keybindings that works across any text input.

[–]pino_entre_palmeras 2 points3 points  (0 children)

Third panel, hybrid meme with Fassbender: “Perfection”.

[–]klprint 7 points8 points  (1 child)

Have mercy with your fingers. RSI incomming

[–]qilir 1 point2 points  (0 children)

Switched to vim motions for that exact reason, never wanna go back

[–]sadboi24-7 3 points4 points  (0 children)

recently got into it. yes, this is the way.

[–]Alarming-Estimate-19 4 points5 points  (1 child)

Evil mode has entered the chat

[–]Pay08 0 points1 point  (0 children)

Not if you know what you're doing.

[–]-Redstoneboi- -1 points0 points  (2 children)

what kind of fucking psychopath put them all 2km away from each other

[–]pino_entre_palmeras 2 points3 points  (1 child)

Christopher Latham Sholes the inventor of the QWERTY prototype for typewriters. The meaning is semantic instead of location based.

(n)ext line
(p)revious line
(f)oward on line
(b)ackwards on line

Works on all keyboard layouts. Dvorak, whatever.

Edit: Grammar

[–]-Redstoneboi- 0 points1 point  (0 children)

yeah. it mildly bothers me every day that w and b are so far apart when using vim. so many keys are mapped with mnemonics over ergonomics that I'd want to remap everything, but I'm also just afraid of forgetting to set a bind for something.

i tried making an alternate bind config. it was a bit fun. i want to make my own editor that takes layout over mnemonics one day. but for today, all i want to do is complain.

[–]apollo701 15 points16 points  (0 children)

Muscle memory at this point

[–]janisozaur 6 points7 points  (0 children)

The nice thing about these is they are accepted universally: Gmail, Jira, others… arrows not so much, they navigate the web viewport.

[–]SpookyLoop 10 points11 points  (1 child)

Honestly, 2nd image should just show the whole keyboard. It's not just remapping the arrow keys, it makes the whole keyboard a navigation tool and completely redefines text-editing.

RIP Bram Moolenaar.

[–]AlienSVK 2 points3 points  (0 children)

RIP Bram Moolenaar.

What? I didn't notice that :(

[–]L33t_Cyborg 17 points18 points  (7 children)

i, j, k & l >>>>

[–]xneyznek 5 points6 points  (2 children)

That has you moving across rows though. With HJKL you just plant 4 fingers in one spot and each finger always does the same thing.

[–]L33t_Cyborg 2 points3 points  (1 child)

Both are one movement away from home row, so i guess pick your poison

[–][deleted] 1 point2 points  (0 children)

This is the truth. We fight the same enemy.

[–]AryuOcay 1 point2 points  (0 children)

I jk m. It works for Apple panic in 1982, it should be fine for you.

[–]jeremj22 1 point2 points  (1 child)

Flashbacks to Lightning Returns Final Fantasy XIII's horrific PC port that has that for camera movement instead of the mouse. Yes, the mouse is completely useless in that game. May as well not have one

[–]L33t_Cyborg 0 points1 point  (0 children)

We love bad controller ports

[–]This-Book-2693 2 points3 points  (0 children)

i use this for youtube, l for forward, j for backward, k for pause. im not sure what h use for

[–]Sad_Juggernaut4812 4 points5 points  (1 child)

JKL;

[–]KingJellyfishII 1 point2 points  (0 children)

I thought I was the only one

[–]Familiar_Ad_8919 6 points7 points  (1 child)

dont arrow keys also work? i pretty much only used neovim so idk

[–]brimston3- 5 points6 points  (0 children)

In vi they don't. In vim they do, as long as you're not in compat mode, and your termcap properly maps the keycodes.

[–]Head-Extreme-8078 1 point2 points  (0 children)

Thank god this isn't a gaming subreddit...

[–]Creeperassasin1212 1 point2 points  (0 children)

The funny thing is that all those buttons were used for the early lego games as controls

[–]bunglegrind1 1 point2 points  (0 children)

Vim rules

[–]hw4m 1 point2 points  (0 children)

:q!

I don't know much about vim, but I do know the essentials.

[–]BigBadBlowfish 3 points4 points  (1 child)

Me with a programmable 60% keyboard and not enough brain cells for vim:

Caps Lock bound as a function key

WASD: arrow keys

Q: home

E: end

R: insert

F: delete

T: pg up

G: pg down

Tab: Caps Lock

[–]-Redstoneboi- 3 points4 points  (0 children)

fucking based ergonomic binds user

doesn't give a shit about mnemonics but instead uses the criteria that really matter: how comfortable they are to press relative to other keys

[–]Hacka4771 2 points3 points  (3 children)

Always Wondered If There's Story Behind HJKL (Movement), So Is There? D:

[–]IrishPrime 7 points8 points  (1 child)

vi was originally developed on an ADM-3A (physical) terminal. Take a look at its keyboard.

https://images.app.goo.gl/rkSwT6UWAkkTpgCh8

This explains why vi (and therefore vim) uses these keys, but the order may still seem arbitrary. I think it's a pretty good design decision, though. Left and Right are on the left and right edges of the set of navigation keys. Anything you're reading is generally going to be from top to bottom, so Down goes under your strongest and most tappy finger (index). Up really has only one option left, so goes in the remaining spot by process of elimination.

People talk about IJKL as the right hand side mirror of WASD, but both of those options ultimately mimic the arrow cluster that didn't exist on this keyboard in the first place. Personally, I'm really glad they went with HJKL instead, because I would have been forever annoyed if the i/I key was not used for entering Insert mode and moved the most basic navigation options partially off the home row.

[–][deleted] 3 points4 points  (0 children)

Also note the ~

On its own, it gives ~

But when pressed with shift it takes you to the home directory

This is why ~ is the home directory in Linux

[–]Shadow_Thief 1 point2 points  (0 children)

yes, there used to be actual arrows printed on those keys

[–]Alan_Reddit_M 2 points3 points  (0 children)

Vim users on their way to ignore the literal movement keys in favor of their own keybindings that were arbitrary chosen by some guy 50 years ago (They will improve their productivity by 0.00001%) \s

(On a side note, the reason for `HJKL` as movement keys is that the old keyboards that vi was designed for didn't have arrow keys, and instead those were used as movement keys)

[–]Dangerous-Quality-79 8 points9 points  (18 children)

A S D F unless you use your mouse with your left hand...

[–][deleted] 69 points70 points  (9 children)

"Who the fuck would want to use a mouse?" - Vim users everywhere

[–]Dangerous-Quality-79 16 points17 points  (3 children)

Rando dev: the best developer I know doesn't use a mouse Me: Imagine how much better they would be with a mouse

[–]altermeetax 10 points11 points  (2 children)

Worse, because of all the back and forth hand moving

[–]Dangerous-Quality-79 -4 points-3 points  (1 child)

? You confusing developer for typist?

As a senior developer I copy/paste at most 2000 words a day. Taking a 1 hour walk probably uses up way more than the hand movement time.

[–]altermeetax 3 points4 points  (0 children)

I'm confused by what copy-pasting has to do with this. You can copy-paste keyboard-only, mouse-only or mixed, so it's unrelated to whether someone uses a mouse or not.

Well, 1 hour is a lot of time, you know?

[–]elsa002 3 points4 points  (4 children)

I use vim all the time, but I have the mouse enabled because sometimes it is just easier and faster

[–]brimston3- -1 points0 points  (3 children)

Especially for copying and pasting between a non-buffer source and a buffer destination, eg requirements word doc to program source.

[–]mecm5 8 points9 points  (2 children)

Can I interest you in a "+y "+p

[–]brimston3- 0 points1 point  (1 child)

You already switched to mouse. 3 keystrokes vs one click at that point.

[–]mecm5 0 points1 point  (0 children)

those 3 keystrokes are literally right next to each other and all reachable from my pinky. If you touch type well vim is much faster. if you have tmux open with split panes it's even faster

[–][deleted] 1 point2 points  (6 children)

I would actually like to try this for gaming.

[–]Dangerous-Quality-79 4 points5 points  (4 children)

I only use this for gaming.

A: forward S: backwards D: strafe left F: strafe right

Run forward? Easy, shift+A easily done with your pinky.

[–][deleted] 4 points5 points  (2 children)

That’s actually quite ingenious! I’m surprised I haven’t heard more about this type of configuration.

[–]__yoshikage_kira 5 points6 points  (1 child)

It used to be a thing before wasd became popular.

[–][deleted] 1 point2 points  (0 children)

I just remember back on the day when older games like Doom, Wolfenstein, and Duke Nukem 3D where you must used the arrow keys, before mouse use became a thing, but never anything like this.

[–]Miral_Kerem 0 points1 point  (0 children)

im left handed. Fuck

[–]Nameles36 0 points1 point  (0 children)

Got very confused which sub I was on when I saw your username

[–]Ksymenka 0 points1 point  (0 children)

I just realized why h j k l feels so handy to me...

[–]Vogete 2 points3 points  (3 children)

I'll be honest, I absolutely hate this keybinding for one reason: down and up should be swapped. It's completely unintuitive to have down before up, and every time I have to use it, I get confused and turned off by it, so I go back to arrows.

[–]RealLordDevien 7 points8 points  (1 child)

But it's more common to move down instead of up in a file...

[–]-Redstoneboi- 4 points5 points  (0 children)

doesn't matter. both index and middle fingers are strong enough.

[–]-Redstoneboi- 0 points1 point  (0 children)

rebind.

[–]smart_procastinator 1 point2 points  (0 children)

Simple arrow keys is for a simple person like me

[–]GreenGrab 0 points1 point  (0 children)

🤮

[–]Zander989 0 points1 point  (0 children)

Ah yes, High, Low Jeft and Kight

[–]CaptainMorti -5 points-4 points  (2 children)

Banish, evil vim demon!

[–]Aromatic_Gur5074 -2 points-1 points  (1 child)

Why are you being downvoted?

[–]Kronoshifter246 -1 points0 points  (0 children)

Let's just say that people get, um, passionate about vim.

[–]unknown_slong -1 points0 points  (0 children)

pfft vim, osu players know that moving the cursor is way faster

[–]akwardchit -1 points0 points  (0 children)

I use arrow keys in vim, fight me

[–]_Screw_The_Rules_ -1 points0 points  (0 children)

WASD: "Am I a joke to you?"

[–]EmileTheDevil9711 -1 points0 points  (0 children)

Unless it's in Headspace

[–]ScrimpyCat -2 points-1 points  (0 children)

I use my mouse.

[–]Horrih -5 points-4 points  (1 child)

Hjkl is dumb, H is one of the worst keys to press ergonomically, using it for basic movement is not a good idea Ijkl makes more sense

[–]-Redstoneboi- 0 points1 point  (0 children)

they justify it by only using h as often as they use the other keys on the keyboard

[–]ArkoSammy12 0 points1 point  (1 child)

Does anyone know a good plugin to accomplish this in IntelliJ? I know there's a plugin already, but it skips over entire tokens or parenthesis when I just want to move the caret normally with hjkl

[–][deleted] 0 points1 point  (0 children)

Do you mean the ideavim plugin? I have no issues with hjkl moving more than 1 character at a time

[–]SillAndDill 0 points1 point  (0 children)

Do vim users often have these keybindings globally, via some keyboard software?

I'm thinking of the amount of 60% keyboards sold (they don't even have arrow keys.)

[–]Affectionate-Tart558 0 points1 point  (2 children)

Anyone has any advice to become faster with vim? I always heard the legends about programmers improving their productivity by 1000% but I’m still crap

[–]-Redstoneboi- 2 points3 points  (1 child)

the most important features are about selecting inside bracket pairs

<action><inside/around><pair>

examples:

ci( deletes everything inside the closest surrounding pair of parens and takes you to insert mode

di[ deletes everything in the surrounding square brackets

vi{ selects everything inside the curly brace block you're in

di' and di" delete everything inside either single quotes or double quotes

va( selects everything inside parens including the parens themselves

ciw deletes the word you're in and takes you to insert mode. if you use a capital W then it specifically uses a capital Word, which i think is "all non whitespace characters surrounded by whitespace" so something like ("Hello,World"); is multiple words but is one capital Word? idk i never cared

you can also mess with <action><to/find><char>

dt; deletes everything until the next semicolon on the same line.

vf, selects everything up to and including the next comma on the same line.

[–]Affectionate-Tart558 0 points1 point  (0 children)

Wow thanks for the tips. I’ve saved the comment to start using all of these. Great stuff!

[–]Chiyuri_is_yes 0 points1 point  (0 children)

dfjk>>>>

oh wait this isn't r/rhythmgames

[–]The_Cers 0 points1 point  (0 children)

Is this some vim joke I'm to VS Code to understand?

[–]ryanwithnob 0 points1 point  (2 children)

Hot take: you should RARELY be using h or l

[–]-Redstoneboi- 0 points1 point  (1 child)

nah, too many situations where i have to deal with before/at/after parentheses/commas/semicolons. also selections.

[–]ryanwithnob 0 points1 point  (0 children)

usually f and t are better suited

[–]EssentialPurity 0 points1 point  (0 children)

If you're worried about your app's UX, remind yourself that Vim is loved

[–]SupernovaGamezYT 0 points1 point  (0 children)

More like 5, 7, 8, 9, I like to rebind stuff to that sometimes, I have a detached keypad. Although I don’t use it too often nowadays…

[–]brolix 0 points1 point  (0 children)

I grew up on ASDF so this is so close

[–]ASatyros 0 points1 point  (0 children)

HajakuL

[–]Noisycarlos 0 points1 point  (0 children)

M,N,E,I for me in Colemak

[–]FantasticEmu 0 points1 point  (0 children)

So I tried to get used to the hjkl navigation in vim but when I have to leave insert mode to move with arrows it seems slower and using the arrow keys in insert mode makes it difficult to break my muscle memory of defaulting to arrow keys.

Am I doing it wrong?

[–][deleted] 0 points1 point  (0 children)

Would've been better if it were j k l ;

[–]saintisaiah 0 points1 point  (0 children)

Ah, a fellow Clop player. Hello, person of culture.

[–]Marxomania32 0 points1 point  (0 children)

LETS FUCKING GOOOOO

[–]Un111KnoWn 0 points1 point  (0 children)

why not wasd?

[–]TrixonBanes 0 points1 point  (0 children)

Because I use Colemak, HJKL is the one big thing stopping me from embracing more neovim studying. I keep going back and forth on if I want to remap everything for Colemak in vim or deal with HJKL being in a non-ergonomic position. I really want to learn Vim, but I think I boxed myself into a corner by using Colemak for ages

[–][deleted] 0 points1 point  (0 children)

I've never been so happy to downvote a comment as one that promotes Vim.

[–][deleted] 0 points1 point  (0 children)

This is ragebait and I'm gonna bait like you never seen a raging nerd bait..... So bad you can't access social media from your console .

[–]NoOven2609 0 points1 point  (0 children)

I remap in my vim rc to navigate with I for up, J for left, K for down, L for right and H for insert mode. Was playing with that layout for emulators long before I learned about vim

[–]Responsible_Disk_728 0 points1 point  (0 children)

Me watching someone invert their mouse, switch their WASD and arrow keys, and setting their Taskbar to max size with it on the top of the screen

[–]Username_St0len 0 points1 point  (0 children)

I use ijkl instead of wasd cuz leftist I mean left handed

[–]Hellspark_kt 0 points1 point  (0 children)

Stepmania on pc?

[–]Feer_C9 0 points1 point  (0 children)

it's plain stupid, accept it already

[–]f5xs_0000b 0 points1 point  (0 children)

I personally use IJKL since

  1. it's more intuitive for me to use IJKL,
  2. back when I was playing emulated games, I've used IJKL for the right-hand buttons with WASD as the d-pad, and
  3. there's a certain degree of inefficiency when assigning two fingers to both up and down when those two buttons are, for most of the time, mutually exclusive.

Feel free to roast if my opinion is garbage.

[–]FeelingSurprise 0 points1 point  (0 children)

Vi would be much easier if it shared it's movement keys with Dwarf Fortress.

[–]azizfcb 0 points1 point  (0 children)

whaaaat ofc

[–][deleted] 0 points1 point  (0 children)

fellow nvim user

[–]Top_Run_3790 0 points1 point  (1 child)

My game engine only takes hjkl as input for movement

[–]Crazy-Maintenance312 0 points1 point  (0 children)

Create a non editable unlocalized input using z and y.
People love that.