I've defined the following autocmd
s, which active/deactivate relative line numbers, depending on whether I'm in Insert mode or not:
" Relative line numbers, except Insert mode
augroup toggle_relative_number
autocmd InsertEnter * :setlocal norelativenumber
autocmd InsertLeave * :setlocal relativenumber
The problem I'm facing is that autocmd InsertLeave * :setlocal relativenumber
only gets executed, when I leave Insert mode using Escape - not using Ctrl+C.
How can I also execute the autocmd
, when I leave Insert mode using Ctrl+C.?