[Vim-l] Remap :q ?

John Beckett johnb.beckett at gmail.com
Mon Sep 3 09:00:22 UTC 2007


Jeff Smith wrote:
> What I'd like to know is whether there's a way to
> remap :q to something harmless.

You could put something like the following in your vimrc file:
 :nmap :q :echo "Press ZQ to quit!"<CR>

Please note:

1. Particularly for a mailing list, please make sure you send plain text
only.

2. This list (vim-l) is to discuss management of the Vim Tips wiki. To
discuss Vim, you should use the vim_use mailing list. I see that this is
confusingly called "vim at vim.org" at:

http://www.vim.org/maillist.php

The advice it gives (mail vim-subscribe at vim.org to subscribe) is correct.

John



More information about the Vim-l mailing list