SourceLair provides you with a Vim mode for its editor, that lets you use your favorite Vim commands and keyboard shortcuts in order to skyrocket your productivity.

Enable Vim mode

To enable the Vim mode for the editor of SourceLair:

  1. open your Editor Settings
  2. scroll down at the Keymaps settings
  3. click on Vim

Vim keymap in the Editor Settings

This should turn on the Vim mode for the editor. To turn the Vim mode off, just go again to the Keymaps setting and click on Default.

Insert and Execute mode

Vim mode in SourceLair operates both in Insert mode, in order to write code and Execute mode, in order to apply motions, operators and execute commands. Visual mode is supported also as part of the Execute mode.

Use the following keys to move across these modes

  • To enable the Execute mode, press Esc while in Insert mode
  • To enable the Insert mode, press i or a, while in Execute or Visual mode
  • To enable the Visual mode, press V, Shift + V or Ctrl + V, while in Execute mode

Available features

When in Execute mode, you can use all Vim motions and operators, search and replace with /, while you can also use a great set of commands to interact with files.


The Vim commands that are available, when being in Execute mode are:

  • :w: Save the current file
  • :wq: Save the current file and close it
  • :wa: Save all files
  • :wqa: Save all files and close them
  • :qa: Close all files open in the editor
  • :x: Save the current file and close it
  • :q!: Close the current file without saving it
  • :tabnext or :tabn: Go to the next (right) file
  • :tabprev or :tabp: Go to the previous (left) file
  • :tabonly or :tabo: Close all files open in the editor, except the current one