I've remapped q to :bp, but to get an instant response, I have to press it twice. Otherwise there's a two second delay. What could be causing this and how can I fix it?
function! NetrwMapping()
noremap <buffer> q :bp<CR>
endfunction
This happens because Vim waits to see if you want to do q<letter>
to start recording a macro (there are a couple other things too like q:
).
You can use the tm
option to change the amount it waits(will apply to all maps), or remap it to another unused letter.
:nmap q :bp<CR>
and that worked without a delay for me. Although if you've mapped something else to q<some other key>, that might be causing the delay. You can check this by trying:nmap q
and see what the output is.