:q Vim mode
Well that didn’t last long. 😆 I turned on Vim mode less than a week ago as an experiment, but I’ve turned it back off now.
Here’s some of what I liked compared to the macOS defaults:
- The standard movement keys. For example, having
j
(down) andk
(up) right under two dominant fingers is so nice. o
andShift-o
to create new lines below / above.dd
to delete the current line.J
to join lines.C
to change the text between the cursor and end of line..
to repeat your last edit at the current cursor position.ct<character>
to change the text between the cursor and next<character
>.dt<character>
to delete everything from the cursor until the next<character>
.ci<character>
to change the text inside a pair of characters (like brackets or parens) and enter insert mode. Great for editing Markdown links!vi<character>
same as above but select the text instead of changing it.f
andF
to jump to a specific character ahead or behind.zz
to center the editor around the cursor.- Not having to touch arrow keys.
- Not having to come up with my own shortcuts for some of these things when they happen to be available in non-Vim mode.
- I’d list Macros here as well, but they don’t work in Obsidian’s Vim mode.
This list would surely expand the longer I stuck with it.
But here are the annoyances that made me go back. Please email me if I’m off the mark on any of this stuff. I’d really like to know!
Moving one character to the right. Let’s say I press *
in a Markdown buffer to add some italics. Several editors, including Obsidian, automatically add the second *
for you. So I type my italicized text and want to move past the second *
to keep writing. In macOS defaults, that’s easy: Control-f
jumps one character ahead, or Control-e
jumps to the end of the line. In Vim, I think the fastest way to do this is either exiting Insert mode, moving to the right with l
or A
, and re-entering Insert mode to type; or hitting Control-o
to do a one-off movement command and then entering that command. (Or, I realize now, just typing another *
, which these editors also handle smartly.)
I find the Vim approach clunky. It’d be slightly better if remapped Caps Lock to Escape, but I already have it remapped to Control and want to keep it that way.
Inconsistencies in different editors. Shift-O
doesn’t work correctly in Obsidian bulleted lists.
It’s supposed to add a line above, but often adds a line below.
Not Vim’s fault, but still.
It looks like there’s a workaround, but I don’t want to bother with it.
Terminal doesn’t feel right.
In the terminal, where I use the wonderful fish shell, I’m very used to hitting Control-e
(jump to end of line) to accept a suggested autocompletion.
To do that in Vim mode, I think I need to exit Insert mode and hit $
which just feels a lot slower for some reason. Or I can use the right-arrow key, but in Vim that’s sacrilege!
There are other little terminally thingies I do all the time that just feel clunky in Vim mode. I’m sure I’d get used to it in time.
Surrounding with multiple characters.
While vim-surround
is great, it just doesn’t work as well as the default surround method in Obsidian and VSCode IMHO.
With the defaults, I can select text and hit ==
to surround the text with two equal signs (highlight notation in Obsidian), or [[
to surround it with two pairs of brackets (wikilink notation).
In Vim, it's not so easy.
Mac speed vs. Vim efficiency. I’m fast on a Mac. I’ve been using macOS / OS X since 2001. I know just about all the tricks, leaning heavily into the baked-in Emacs movements, and the muscle memory is deep. It’s bone memory now.
So yes, Vim movements and operations are arguably more efficient in terms of raw keystrokes and movement around the keyboard, but that does not add up to greater speed for me and maybe never will.
In conclusion, I’m glad I ran this experiment. I’ve been distracted by thoughts of Vim mode for some time now. But now I remember why I went back to the macOS defaults.