Obsidian and Vim Mode

For the last several days, I have been playing around with Obsidian in Vim mode. Vim, for those who don’t know, is a powerful text editor that can take some getting used to. It uses different “modes”: for editing, for navigating and issuing commands. It’s keyboard commands are designed for touch typists so that you can do anything you need to do without your fingers ever leaving the keyboard.

Obsidian offers a “Vim mode” which gives some of Vim’s capabilities. I like the idea of Vim but I’m not completely sold on its implementation in Obsidian yet.

Because of how navigation work (basic cursor movements use the h, j, k, and l keys) a fixed-width font is better for Vim. The theme that I use, Pisum, doesn’t make use of a fixed-width font. That meant I needed to edit the styles in the theme to get what I wanted.

This was a useful side-effect of experimenting because I found that it was pretty easy to edit the styles. I copied the styles for the Pisum theme into another .css file and edited there so I didn’t mess up the original theme. I made two basic changes:

  1. I switched to a fixed-width font in the editor (but not in preview mode).
  2. I modified the emphasis style to show an underline. I like seeing the underlying for emphasis because this is what I am used to from decades of writing manuscripts in standard format–in which italicized text is represented with underlines.

Here is an example of what this looks like:

An example of my Obsidian theme changes
An example of my Obsidian theme changes

But there are some serious limitations. For one thing, Obsidian is not Vim, and that is a good thing, since Obsidian is really focused on something different from what Vim attempts to do. It means, however, there is limited support for .vimrc files in which various setting, keyboard mappings, and other configurations that customize the editor are stored. There is a plug-in that provides some limited support for .vimrc files, but it is limited

It is nice that Obsidian includes the Vim mode option because it makes the transition to Obsidian easier for people used to Vim’s keyboard mappings. But after playing around with Vim mode for several days, I think I am going to turn it off. I asked myself how often, while writing do I need to do some of the fancy things that Vim’s commands let me do? The answer is rarely.

All is not lost, however. I learned that it is easy to edit themes in Obsidian–by far easier than any other editor I’ve played with. And some of my edits I’m keeping. I’m turning off the fixed-width font. I prefer the default theme font for notes. But I’m leaving my underlined emphasis in place. And there are probably other tweaks I’ll make. I have it in my mind to produce a theme that looks like Word for DOS 5.5 (which was my all-time favorite word processor). I’d do this more for learning than actual use. After all, these days, everyone want to use a dark theme because it’s easier on the eyes, and that bright blue background in Word for DOS is the antithesis of a dark theme.

Once I have my personal theme stable, I’ll write a separate post about it.

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.