486
71

Only me?

7d 8h ago by sh.itjust.works/u/napkin2020 in memes from sh.itjust.works

When $EDITOR is vim, but I expected anything else:

opens file, with small text on the top; text begins changing; text duplicates in size, then triples; text returns to original size; text increases in size to fit several screens...

Then my great reflexes kick on and I notice something wrong :)

Do you prefer when EDITOR is set to emacs?

Personally, yes. But the default being nano is very sensible.

The default should be mcedit. Much more usable than nano

I ideally with evil installed and easily toggleabkw with M-x evil-mode<enter>

for accessibikity purposes

First few time I opened vim (will neovim) I failed to see how to enter a command, and closed the window to get out of it

I will legitimately go esc, :w, i on Google Docs to try and save the document...

Escape in some email clients cancels a new email. I had to retype many emails before email clients began auto-saving drafts.

The paiiiin! How many hours I lost because of this?

Spoiler

Probably less than I used to configure my neovim...

my work client cancels the new mail without there being a draft, though that may be because of muscle memory pressing a key combo after esc. its major pain o7

I often xs on graphic IDEs too.

On most of them, it works if you don't have any text selected. The Microsoft ones do really weird things.

Explain pls for us vimless noobs

Direction navigation in vim is hjkl.

I know I'm just a vim-less heathen, but using letters for navigation in a text editor seems kind stupid when arrows exist.

No, you're 100% right. The only reason it's this way is this: https://pikuma.com/blog/origins-of-vim-text-editor

These literally were the arrow keys on the machine that vim was originally developed on.

Why the hell didn't they go with JIKL or something instead then, so the pattern at least resembles the direction it navigates?

Wasd was revolutionary at the time

This really just shows how fundamentally terrible product developers engineers are.

I remember going from using Z/X/C+mouse2 for left/backpedal/right+forward WASD was such an adjustment

so your finges dont have to leave the home row. Its acually peak when you used hjkl for some time

You should boycott vim. That'll teach 'em.

The reason it's so popular is because it provides directional navigation on the home row, with the direction that's by far the most common (down) under your strongest, dominant finger (the index finger).

It's much better for both efficiency and ergonomics than arrow keys.

Why would you move your hand to arrow keys when the letter are already under your fingers?

ESC, use-letter-to-navigate, i, type, ESC, navigate, i, type

Really simple. On my keyboard I re-mapped ESC to TAB so I don't even have to move my hand to switch between navigate and insert modes.

So you've transferred the required hand move from the right hand to the left, and added extra required keystrokes to accomplish the same task. I don't see how that isn't worse.

No, it's a key stroke, not hand move. I don't have to reposition my hand to hit ESC. You do have to reposition your hand to use arrow keys.

Also, you usually move the cursor by more than just one character. It's one extra keystroke to reposition the cursor, not to move it by one char. You have shortcuts to jump to end of file, specific line, end of line or even create and jump to bookmarks. All this with just standard keys, without repositioning your hands to use the mouse or arrow keys.

Your keyboard must be slightly different than the one I have in front of me right now. Home row to esc and home row to arrows is the same distance on mine.

First, as I said, I remapped ESC to TAB key. Tab is very close.

Second, it's different to hit ESC ones than to use arrows keys to move around. To go back to home row after using arrow keys I have to feel around the keys trying to find "j" again. Or look at keyboard. I don't have to do that after hitting ESC once.

I'm not bothering to talk about non default layouts. Remapping is a separate discussion, since I could just as easily say it's better to remap wasd to the arrow function and have the FN key toggle it, since a much higher number of people already have that navigation method trained into muscle memory. This is a preference game no matter what, but it becomes an especially pointless discussion if you base it on custom layouts.

Custom layout was only part of my answer. Most vim users don't use custom layouts and second point still holds.

I could just as easily say it’s better to remap wasd to the arrow function and have the FN key toggle it,

Great idea. It would give you like 5% of what vim offers but 5% is better than 0%.

much higher number of people already have that navigation method trained into muscle memory

All vim users have hjkl trained into muscle memory. No one is saying that it's automatically better. vim has a learning curve. When you know how to use it it's simply better than traditional editors.

I use the normal arrow keys in vim to navigate, but I love all the other neat features and I propably only know <20% of them.

And maybe on a 40% keyboard with custom layout every key is very near. My arrow keys are very custom placed, btw. I have 4 of the same keyboard (Planck), because I am so used to my own custom layout and layers.

Moving hands is an extremely time-consuming task when you're typing 60+ words per minute. Couple of keystrokes are much much faster than relocating your hand twice.

I use layers so esc is actually almost directly under my pinky.

I have it instead of CapsLock, tab is too useful to forego.

But yes, arrow keys are too far, and I avoid them everytime I can, including in Shell

Yeah, sorry. I have:

Esc -> Caps lock (useless so far away)

Caps Lock -> Tab (the most useful so closest)

Tab -> Esc -> second most useful

I had it for so long that I forgot which one is which :)

Imma throw another option into the ring which is Caps lock -> Esc / Ctrl. it‘s esc when tapped and ctrl when combined/ held for longer. veeeery useful

Sounds interesting. How do you set this up in Linux? I'm just remapping keys on X level now.

I‘m sure there’s a good way to do this on the OS side, but I‘m doing it in ZMK/ QMK.

This is just for wireless? I still prefer to use USB. I will try to find something similar, thanks.

ZMK does wireless and wired, with a focus on wireless, whilst QMK has its focus on wired and i’m not sure whether it does wireless.

I got two Aurora Sofle (shoutout to splitkb for having good products and customer service) one wired with qmk (and MX switches) and one wireless with zmk (and kailh switches). Both work very well, but i’ve found that I prefer kailh switches over MX.

QMK is also used by folks like Keychron for their wired keyboards, and for gui focussed ppl it’s configurable via the browser app „via“.

Great, I will give them a try. Thanks. I'm sure one day I will have to evolve beyond just changing keycodes in X :)

moving my hand this much SUCKS

Instead of using the arrow keys most vi & him users navigate the cursor around the doc by using letter keys. I do it so subcociously now I am not sure which direction is the j when I use my phone.

But keyboards have arrow keys now?

Look down at your keyboard. Look at the letters, look at the arrows. You can use hjkl without moving your right hand at all, it's always in a position to enter commands or text. With arrows, you'd constantly need to switch positions.

I'm one of the noobs. You use letter keys to navigate around text?

Vim has several modes. INSERT mode let's you write text, NORMAL mode let's you navigate (with h,j,k,l and others) and perform operations on the text with your keyboard, like "dw" to Delete Word or "A" to enter insert mode at the end of the line.

You can use arrow keys to navigate in insert mode. However I just press escape, which changes to normal, navigate to where I want to, then change to insert mode.

I may seem like this makes simple navigation complex, and it kinda does. But complex navigation becomes easier.

Vi (and vim and neovim)'s primary concern is viewing and editing code, writing is secondary (although it's still an excellent experience)

Oh, I did not know of 'A' before. Hopefully I can train myself to use it.

I use ‘O’ the most. It inserts a newline at the end of the line and starts Insert Mode after the newline.

Awesome. After many years of vim-use I learned about CTRL+n as well. A game changer.

And while we're at it, I also installed vim-nox to be able to use vim-snippets with utilsnips to TAB for even more joy of programming with vim. [=

Yes, (neo)vi(m) has different modes, in normal mode the characters are shortcuts, hjkl is used for navigation. However other methods are prefered, w, e, b - jumping words, f,t - jumping to a specific character etc. Its way faster. Also it can be combined d2w (d)eletes the next (2) (w)ord. Or more advanced di" (d)eletes the text (i)nside the "..."

Insert mode is what you except: it writes what you type. Can be accessed by i - (i)nsert before a - (a)append after. Going back to normal mode is ESC (or many configure tab)

20Gwwbcwkurva<ESC>:wq

This is a problem for me on systems that only have nano installed. Gets me every time

I always uninstall nano on systems with not much users. On the more busy and established servers, I need to leave it as-is and I have to adjust when visudo opens nano and I forgot to put EDITOR=vim in front of it.

Can't uninstall it or my coworkers would go nuts. On systems with separate users, I can set it via .bashrc, but on shared user systems ... Well. Above happens.

I cannot begin to describe how many times I’ve had to re-type the same info in some input form because I hit esc when I had first finished it!

It's been so long since I worked on a machine where I couldn't use the cursor keys in vi, I don't think I'd even be able to anymore.

I only understand this reference because I worked for a company at one point that had a large number of NeXT and Solaris hosts that only had vi installed with letter key navigation, so my muscle memory does not use arrow keys.

ITT: People who don't use vim and insist we have arrow keys now so don't need hjkl anymore.

Coders use word docs?

I'm not a programmer but I still open up notepad and write in markdown.

It's just faster.

the collab feature of google docs is nice

Erm. This would be vi? vim has arrow key support.

Implying that vim users use arrows instead of hjkl? Blasphemy!

I do :p and I use vim a lot.

Here's what my terminal usually looks like

>vim srv/txt.txt Writes a bunch of lines of code/words/docker containers. [ESC] :sq Can't edit file without sudo :q! >sudo vim srv/txt.txt 🥹

I use eMacs btw

jjjjjjjjjjj? Nah fam, 11j.

Hmmm, j is not working better try k some... And multiple esc

<ESC><ESC><ESC><ESC>ujj<ESC>u<ESC>v0wsffs<C-z><C-s><A-F4><A-enter>vim pres.typ...

When I start a new roguelike:

Activate [j]ump ability, view [l]og, no item underfoot to mark for [k]eeping, [h]ide.

ting in vim I sometimes still forget I start in normal mode.

And they lived happier ever after.

THE END :wq!