Sometimes in a diff I want to obtain just the single line that I'm on. So I made the following mappings:
nnoremap dO :.diffget<CR>
nnoremap dP :.diffput<CR>
This worked well, except now whenever I do dd
it sits and waits for more input since the last d
could be the start of one of my new mappings. Now, of course I could just change my mappings to something different to solve this problem, but this means that I can't use any of the d
namespace that isn't currently being used which is quite unfortunate. I want vim to understand that I'm simply trying to extend the d
namespace. dd
is a finished command and ddO
is invalid, therefore there is no need to wait after dd
has been entered. Is there a way to accomplish this?
dd
. I have tested your mappings and I see no delay withdd
. Are you sure you do not have another set of conflicting mappings? Use:verbose nmap dd
to see alldd
related mappings.dd
works as expected. After the mappingdd
pauses for a few seconds before acting.:verbose nmap dd
reports "No mapping found." I have noticed after some experimentation that when set from my.vimrc
I experience this problem, but when I set it straight from an ex command it works as you've described. Not sure why there would be a disconnect there, but honestly the wait seems like expected behavior to me.vimrc
or via an ex command. I was able to successfully test your mappings in myvimrc
without a delay. If you are still experiencing a delay then I must assume there is something in yourvimrc
that is causing the issue. I would suggest you start with a bare vimrc or at the very least comment out portions of yourvimrc
until you find the culprit.