Sal's

Vim’s Ctrl-w

When I recently whined about modal editing feeling clunky, I think I was being impatient, as I’ve been hitting Vim and Neovim pretty hard lately and have not been feeling that way. That’s also because I’m learning some more stuff and getting more efficient.

Scenario: I’m dashing out a sentence, I typo something or change my mind about wording, and then want delete the last one or two words. I do this all the time because I’m a fast-but-sloppy typist.

With the macOS defaults, I use Option-Delete to delete backwards by word. It’s about as efficient as you can get. In Vim, I had been exiting insert mode with Escape or Ctrl-[, going backward with b, and then deleting with dw or daw or 2dw or veeed or whatever, and then jumping back to where I was with $. That felt clunky compared to the macOS way.

But I was a fool! In Vim, Control-w in insert mode does the same thing as Option-Delete. Bam, problem solved. Once it commit it to muscle memory, anyway.

I’m happy that Vim is working out for me again for a number of reasons. One of them is that it’s a nice source of consistency as I hop between macOS and Linux, which I’ll soon be doing with increased fervor.

#Vim #Modal-Editing #Text-Editors #Linux