Adding a Keyboard Shortcut to VIM

The below example will show you how to use Ctrl + k as a keyboard shortcut to execute the following key sequence when you are in insert mode : <esc>:wq<Enter> Example open ~/.vimrc file go to the bottom of the file add the following lineinoremap <C-k> <esc>:wq<Enter> save and close file exit and restart terminal