Emacs bindings in the editor

I use Emacs bindings in my IDE and Vim bindings in Obsidian, at the moment.

I’m pretty familiar with both, but it would be super helpful to have Emacs bindings available in Obsidian (CodeMirror/ProseMirror may have some support?), across platforms like Windows and Linux too.

14 Likes

+1 on this.

Joplin has good support for Emacs keybindings, but poor support for [[ internal links.

With an Android app and Emacs it would be easy to move to Obsidian without messing up my muscle memory for typing.

1 Like

How can you have Vim, but not Emacs keybindings!! ?
We need it like yesterday.

2 Likes

Just to specifically answer your question, “How can you have VIM”, Vim keybindings (as far as I understand) is only implemented through the Vim keybindings implementation from CodeMirror. And that unfortunately doesn’t have a maintainer.

It isn’t really being developed as a feature of Obsidian, per se.

CodeMirror also has an Emacs bindings package, though some things like C-w just cannot work due to browsers capturing them.

https://codemirror.net/demo/emacs.html

1 Like

I did find a post related here; however, it has yet to be updated and does not seem to have much traction, so I am creating a new feature request with the hope of this being the main source.

Use case or problem

With Obsidian being largely first a markdown text editor, it is important to be efficient with inserting, deleting, and writing text; however, using simple arrows and mouse clicks dramatically reduces my workflow and efficiency. Emacs is a well-known and efficient non-modal text editor used by many that comes with its own set of keybindings to enable efficient text modifications.

Proposed solution

Obsidian currently supports Vim keybindings for text editing through CodeMirror found here. CodeMirror also supplies an interface for Emacs keybindings found here.

Now, it is understood that Obsidian also uses Ctrl+[…] keybindings natively to navigate the application; however, these are configurable and would be a tradeoff for those looking to use Emacs keybindings as the first-class interface; therefore, a warning can be issued before enabling, etc.

The issue CodeMirror faces is predominantly with the Ctrl+W and Ctrl+N keys (base keybindings of Emacs) due to browsers taking precedence; however, since Obsidian is a standalone application, this should not be an issue, assumingly.

Related feature requests

Again, there is one other feature request available here, but it seems dead; so, I created this one in hopes of gaining some traction.

3 Likes

+1 on this request a hundred times. Emacs keybindings would be amazing. I was not aware that CodeMirror supplies an interface for it.

Is there a reason not to make it available as an option (like Vim keybindings)?

Another +1. I keep stumbling as my fingers type Emacs when I’m in Obsidian.

Also +1, Emacs keybindings would make using Obsidian a significantly better experience for me.

I don’t know if CM6 has an additional emacs keymaps (beyond the regular mac emacsy). Anyway I am going to move this to plugins ideas.

Another +1 for Emacs keybindings. Two things missing that are definitely hindering use:

One is Emacs ctl-K and ctl-Y (Kill & Yank), essentially “Cut current line & Paste”. In Obsidian, ctl-K correctly deletes the rest of the current line, but does not save the cut text so can be pasted with ctl-Y. In Bear, these two keys work great.

Other is being able to use Ctl-space to “set the Mark”, in order to select a region of text.

+1 would be such a great feature!!

+1 for the emacs key binding!

+1
Currently I can right click on the note in explorer view and click open in default app which starts Emacs on the .md file. I edit as desired, save, exit, return to Obsidian. Sometimes the pane is updated, sometimes it’s closed. This works fine until I forget that I’m not in Emacs and start opening new notes (C-n) and selecting all the text (C-a) and over writing it as I start typing. Fortunately C-z works.

I’m new to Obsidian; so, if there’s a way to automatically invoke Emacs when editing a note, please let me know.

PS: I’m on Windows, but will migrate to Linux someday.

Not a solution but a workaround for ubuntu linux users:

  1. enable system-wide emacs keybinding: https://www.reddit.com/r/emacs/comments/18hz8k/emacs_key_bindings_everywhere_in_ubuntu/
  2. disable obsidian’s shortcut for bolding and closing windows
  3. enable obsidian’s vim key-binding (common emacs keys like C+f, C+b, etc should work too, at least for me!)

+1
People keep asking this feature.

+1
Please add this feature. It’s central to my editing experience.

+1. This is the main reason I am still using emacs for longer more involved notes

+1, still struggling with incomplete support of emacs keybindings on mac.

1 Like