4

Getting my content saved.

I want my content saved or written without using the escape button. I'm worried as my data will not be saved.

Ranjit Mane
  • 41
  • 1
  • 4

3 Answers3

5

Try Ctrl+[, which is equivalent to Escape in most terminals.

hobbs
  • 223,387
  • 19
  • 210
  • 288
5

<C-c> and <C-[> can both be used instead of <Esc>.

romainl
  • 186,200
  • 21
  • 280
  • 313
  • 1
    Good point on C-c, but try the other one first, as C-c is [a bit more brute force](https://stackoverflow.com/questions/5030164/whats-the-difference-between-ctrlc-and-ctrl). – hobbs Dec 06 '17 at 08:52
3

"Easy mode" / 'insertmode'

You can use <c-l> to get to normal mode in case you accidentally set 'insertmode'.

<c-]> / <c-c>

Just as @hobbs and @romainl said, you can always use <c-]> (preferred) / <c-c> to exit to normal mode. <c-]> is the same terminal sequence as <esc>, but <c-c> will exit to normal mode but will also not execute InsertLeave.

<c-o>

<c-o> will put you in normal mode for 1 command then re-enter insert mode.

<c-\><c-n>

Pretty much will exit to normal mode from any other mode except Ex-mode. It will even exit form Terminal-mode, but only for 1 command.

For more help see:

:h 'insertmode'
:h i_CTRL-L
:h CTRL-C
:h i_CTRL-O
:h CTRL-\_CTRL-N
Peter Rincker
  • 43,539
  • 9
  • 74
  • 101