Home Explore Blog CI



neovim

8th chunk of `runtime/doc/intro.txt`
bd3a0a757ab7dd13cbccd1cc65c05df8344e9444161891150000000100000fa1
 special case of Insert mode.  You
                        can do the same things as in Insert mode, but for
                        each character you enter, one character of the existing
                        text is deleted.  See |Replace-mode|.
                        If the 'showmode' option is on "-- REPLACE --" is
                        shown at the bottom of the window.

- Virtual Replace mode: Virtual Replace mode is similar to Replace mode, but
                        instead of file characters you are replacing screen
                        real estate.  See |Virtual-Replace-mode|.
                        If the 'showmode' option is on "-- VREPLACE --" is
                        shown at the bottom of the window.

- Insert Normal mode:   Entered when CTRL-O is typed in Insert mode (see
                        |i_CTRL-O|).  This is like Normal mode, but after
                        executing one command Vim returns to Insert mode.
                        If the 'showmode' option is on "-- (insert) --" is
                        shown at the bottom of the window.

- Insert Visual mode:   Entered when starting a Visual selection from Insert
                        mode, e.g., by using CTRL-O and then "v", "V" or
                        CTRL-V.  When the Visual selection ends, Vim returns
                        to Insert mode.
                        If the 'showmode' option is on "-- (insert) VISUAL --"
                        is shown at the bottom of the window.

- Insert Select mode:   Entered when starting Select mode from Insert mode.
                        E.g., by dragging the mouse or <S-Right>.
                        When the Select mode ends, Vim returns to Insert mode.
                        If the 'showmode' option is on "-- (insert) SELECT --"
                        is shown at the bottom of the window.

==============================================================================
Switching from mode to mode                             *mode-switching*

If for any reason you do not know which mode you are in, you can always get
back to Normal mode by typing <Esc> twice.  This doesn't work for Ex mode
though, use ":visual".
You will know you are back in Normal mode when you see the screen flash or
hear the bell after you type <Esc>.  However, when pressing <Esc> after using
CTRL-O in Insert mode you get a beep but you are still in Insert mode, type
<Esc> again.

                                                        *i_esc*
 >
 FROM mode      TO mode
                Normal  Visual  Select  Insert    Replace   Cmd-line  Ex >
 Normal                 v V ^V    *4     *1        R gR     : / ? !   gQ
 Visual          *2               ^G     c C        --        :       --
 Select          *5     ^O ^G            *6         --        --      --
 Insert          <Esc>    --      --              <Insert>    --      --
 Replace         <Esc>    --      --    <Insert>              --      --
 Command-line    *3       --      --     :start     --                --
 Ex              :vi      --      --     --         --        --

 -- not possible
<

- 1 Go from Normal mode to Insert mode by giving the command "i", "I", "a",
    "A", "o", "O", "c", "C", "s" or S".
- 2 Go from Visual mode to Normal mode by giving a non-movement command, which
    causes the command to be executed, or by hitting <Esc> "v", "V" or "CTRL-V"
    (see |v_v|), which just stops Visual mode without side effects.
- 3 Go from Command-line mode to Normal mode by:
    - Hitting <CR> or <NL>, which causes the entered command to be executed.
    - Deleting the complete line (e.g., with CTRL-U) and giving a final <BS>.
    - Hitting CTRL-C or <Esc>, which quits the command-line without executing
      the command.
    In the last case <Esc> may be the character defined with the 'wildchar'
    option, in which case it will start command-line completion.  You can
    ignore that and type <Esc> again.
- 4 Go from Normal to Select mode by:
    -

Title: More on Vim Modes and Switching Between Them
Summary
This section continues the discussion of Vim modes, focusing on Replace mode, Virtual Replace mode, Insert Normal mode, Insert Visual mode, and Insert Select mode. It also explains how to switch between modes, emphasizing that pressing Esc twice will usually return you to Normal mode. A table summarizes the commands and key presses needed to transition from one mode to another.