I often accidentally open cmdline-window during editing and want to disable the key mappings used to open it in normal mode: q:
, q/
, q?
I tried mapping as such:
nmap q: <Nop>
This works when the keys are executed under a second or so but doesn't if there is an extended pause between q
and :
. Until recently I was using this to solve the problem:
nmap q <Nop>
This works for all three mappings but I've discovered I can no longer record macros. How can I disable the cmdline-window mappings and still be able to use q
to record macros?
:h 'ttimeout'
and:h 'ttimeoutlen'
. Also for what it's worth I use the following:nnoremap Q q
nnoremap q <Nop>
this wayq
is disabled and I record my macros with<S-q>
.