Vim emulation within Nova is a custom implementation meant to emulate common features of Vim that apply to Nova as a graphical editor.

We intend this to behave in a similar way to how other popular editors emulate it. This Vim support is also the first major piece of Nova written entirely in Swift. This covers the majority of the features our users have contacted us about since Nova launched. It does not attempt to cover all of Vim or anywhere close it.

Our intent is to implement the most common use cases that our users request, starting with the basics.


Enabling Vim in Nova

Enable Vim mode from the Editor menu. Once enabled, the editor shifts to using cursors and behavior associated with the current active mode and operation.


πŸ™† What’s Currently Supported

πŸ‘ Normal Mode

  • Operators (Change, Delete, Yank, Replace, Swap Case, Uppercase, Lowercase, Shift Left, Shift Right)

πŸ‘ Visual Mode

  • Characterwise
  • Linewise
  • Blockwise

πŸ‘ Insert Mode

πŸ‘ Motions

πŸ‘ Modifiers

  • Around / Inside for text objects

πŸ‘ Counts

  • Both for operators and motions, multiplying

πŸ‘ Registers

  • Named registers, including the uppercase “append” registers
  • Numeric registers, including 0 (yank) and the 1-9 (delete) stack

πŸ‘ A Vim bar at the bottom of the editor

  • Shows the active mode, pending operation, and suggestions

πŸ‘ Configurable Options

  • A new Vim section of the Editor preference pane contains some common configuration options

πŸ™… What’s Not (Yet?) Supported

⛔️ Marks

  • This will likely be added sooner or later.

⛔️ Read-Only Registers

  • Most of them do not pertain to Nova.
  • Window / Split Movement and Management Bindings
  • We received mild requests for this, but not enough to warrant integration at the moment. We may definitely reconsider.

⛔️ Command Mode / Ex Mode

  • While supporting : as a graphical UI would be easy enough, we’re not certain right now how much of the vast number of commands in this mode we’d reasonably want to integrate, so for now it’s excluded.

⛔️ Reformat / Reindent operator =

  • We are likely to do this sooner or later, but as Nova does not currently have a unified “reformat” feature for the languages it supports, we’ll have to get there first.

⛔️ Filtering Operator !

  • This is something we may end up doing sooner rather than later, based on demand

⛔️ Parsing of the .vimrc file

  • Nova does not parse this file.
  • Options related to the Vim emulation are available in the Editor preferences pane.
  • We may revisit this in the future, especially to support custom bindings.

⛔️ Custom Rebinding of Key Chords

  • We’d love to support this, either as part of .vimrc or through the UI, eventually.

⛔️ Support for Vim Plugins

  • We don’t have any plans here due to its technical complexity.
  • Most likely we would try to emulate the most popular plugins

⛔️ Probably Lots of Other Things

  • Vim is… a lot

πŸ’ Thoughts on NeoVim

Several users have expressed their thoughts that embedding the NeoVim editor engine would be a viable option for getting “all” of Vim’s features. While the NeoVim project is a great project, there are several factors that greatly limit us approaching that task:

  1. NeoVim’s source is very large, and observing/pulling/maintaining updates of that source alongside and into our project would be a too much for our team.
  2. NeoVim’s API design requires handing off ownership of the editor’s backing text buffer and associated data almost entirely to the library, which makes it difficult for the rest of Nova to integrate over it (i.e. syntax highlighting and extensions).
  3. Since NeoVim is the core of an editor and not a wrapper, we’d effectively be re-wrapping Nova around it instead of the other way around (as this was NeoVim’s original design intent).

While we understand the huge benefit that would come with “it’s just wrapped around NeoVim,” this falls pretty far outside of our scope or resources for the Nova project, so for our Vim support we have intended to write our own wrapper around our editor core. Let us know if you have any other thoughts here.

This article was last updated on November 2, 2021