hamlen wrote:
Q is usually mapped to gq by vimrc_example.vim.
That indeed seems to be the source of the problem! Thanks, Tony.
When I execute :unmap Q, the problem goes away and I can replace
selected text with Q.
Is there a compelling reason why this key-binding exists? It is very
unintuitive to the casual user. The casual user doesn't know anything
about key-mappings, much less how to find vimrc_example.vim and remove
this binding. To such a user, this quaint quality of Q is quite
quixotic. :)
--Kevin
I think the reason for this mapping lies in the following paragraph at
the end of :help Q:
Note: In older versions of Vim Q formatted text,
that is now done with |gq|. But if you use the
|vimrc_example.vim| script Q works like gq.
To override settings set by vimrc_example.vim, don't modify the file
itself, because any Vim upgrade might silently remove your changes.
Rather, I recommend to invoke it (using the :source or :runtime
commands, q.v.) somewhere near the start of your own vimrc, then
override what displeases you in its settings. For example, here is the
beginning of a sample vimrc similar to mine:
Settings file for vim and gvim
force English messages and menus
if has(multi_lang)
if has(unix)
language messages C
else
language messages en
endif
endif
invoke the example vimrc, to set many useful settings
runtime vimrc_example.vim
here come our own customizations, including overrides to the above
filetype indent off
unmap Q
etc.
Best regards,
Tony.
--~--~-~--~~~---~--~~
You received this message from the vim_dev maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---