Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denops_std/option/vim/mod.ts>insertmode

📚 Standard module for denops.vim
Go to Latest
variable insertmode
import { insertmode } from "https://deno.land/x/denops_std@v5.0.2/option/vim/mod.ts";

Makes Vim work in a way that Insert mode is the default mode. Useful if you want to use Vim as a modeless editor. Used for evim. These Insert mode commands will be useful:

  • Use the cursor keys to move around.
  • Use CTRL-O to execute one Normal mode command i_CTRL-O. When this is a mapping, it is executed as if 'insertmode' was off. Normal mode remains active until the mapping is finished.
  • Use CTRL-L to execute a number of Normal mode commands, then use <Esc> to get back to Insert mode. Note that CTRL-L moves the cursor left, like <Esc> does when 'insertmode' isn't set. i_CTRL-L

These items change when 'insertmode' is set:

  • when starting to edit of a file, Vim goes to Insert mode.
  • <Esc> in Insert mode is a no-op and beeps.
  • <Esc> in Normal mode makes Vim go to Insert mode.
  • CTRL-L in Insert mode is a command, it is not inserted.
  • CTRL-Z in Insert mode suspends Vim, see CTRL-Z. However, when <Esc> is used inside a mapping, it behaves like 'insertmode' was not set. This was done to be able to use the same mappings with 'insertmode' set or not set. When executing commands with :normal 'insertmode' is not used.

NOTE: This option is reset when 'compatible' is set.

(default off)