I am trying to map Ctrl + q to quit editing the file. I added the below line to my .vimrc
nnoremap <C-q> :execute "q"<CR>
On pressing the above key combination, nothing happens, vim doesn't quit. No Error, no message.
Can you please help me figure out what is wrong with this setting?
EDIT: My vimrc file is https://gist.github.com/mdtareque/9d28c7b63b2b77d15679374a8dfbad20
I see no effect of pressing <C-q>, probably something is conflicting with existing setup/plugins. Above is my vimrc, almost all settings are being used.
Output of verbose map <C-q> is Last set from ~/.vimrc
FYI. I am on ubuntu 15.10, and
$ vim -version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 21 2015 12:30:04)
:verbose map <c-q>tell you? – Antony Jun 23 '16 at 20:19:verbose map <C-q>I getn <C-Q> * :q<CR>and then on the next line it says "Last set from ~_vimrc." What does the first line say for you? – Tumbler41 Jun 23 '16 at 21:33n <C-Q> * :q<CR>– mtk Jun 23 '16 at 21:41:messages. – Antony Jun 23 '16 at 21:42:messagesjust displays filename, num of lines and character count and then says 'Press Enter to continue' – mtk Jun 23 '16 at 21:45<C-q>is a special mapping interpreted by the terminal meaning "continue output" (<C-s>is "stop output"). The solution is the same as in the duplicate target. – Martin Tournoij Jun 23 '16 at 22:01nnoremap <leader>q :q<CR>and living peacefully now – mtk Jun 24 '16 at 00:00