How to map key to quit neovim

map('n', '<C-x><C-c>', ':wa | qa<cr>')
is not work well

Can you describe precisely what is not working well?

will show

It is imposible currenty.
The short explanation is: ctrl-c interrupts the getting of the next key. :help map_CTRL-C

1 Like

It is possible, I have just checked it.

map('n', '<leader>s', ':wa <bar> <esc>:qa<CR>')

Feel free to replace <leader>s with your own combination you feel the most comfortable with.

I would use <leader>q

You can also use a key like F6 :

nmap <F6> :qa! <CR>