InsertLeave
InsertLeave is an autocommand event in Vim and Neovim that fires when the editor switches from Insert mode back to Normal mode. It provides a hook for running commands or functions immediately after the user finishes inserting text.
The event is used in configuration and scripting to perform actions that should occur after editing pauses.
A typical practical use is to toggle settings that should be different while typing. For example, many
autocmd InsertEnter * set paste
autocmd InsertLeave * set nopaste
Related autocommand events include InsertEnter, which fires when entering Insert mode, and other editing-related events such