I use a comma as my leader key. I would like to be able to press the comma twice rapidly (i.e., <leader>,) to achieve the native functionality of the comma (i.e., jump back after f/F and ;).
To that end, my .vimrc begins
let mapleader=","
map <leader>, ,
But when I press ,, it does nothing. What should I change to make it work?
:h 'ttimeoutlen'(but that would impact all mappings). Using a non recursive mapping is the right solution, actually by default you should always be using non recusive mapping unless you have a very specific need and you know what you are doing. And furthermore it would be better to use mode specific mappings likennoremapandxnoremap. – statox Mar 01 '22 at 14:39.vimrc. So I will do some digging to see if I can find what is interfering. – Alex Roberts Mar 02 '22 at 04:49.vimrcthat is preventing your answer from working with my setup? Are there any particular types of settings that might be expected to mess with<leader>,, or is there a way to list such mappings and find what<leader>,is mapped to? – Alex Roberts Sep 27 '22 at 18:31:map, the list includes the line,, ,. Shouldn't that mean that it would work? – Alex Roberts Sep 27 '22 at 18:33:verbose filter /,/ map, which filters out mappings that contain,. – husB Sep 28 '22 at 03:34.vimrc, but in the process I stumbled across a curious solution that I don't understand: when I press\,I get the old,functionality, even though I have setlet mapleader=",". Even more strangely,\,works even when I deletenoremap <leader>, ,from my.vimrc. So though I have no idea why this works, it is my solution for now. – Alex Roberts Sep 29 '22 at 16:31sneak. From running:map:x \ <Plug>Sneak_,o \ <Plug>Sneak_,n \ <Plug>Sneak_,– Alex Roberts Sep 29 '22 at 16:33sneakhas somehow replaced the usual,functionality with<Plug>Sneak_,, so here is the solution when usingvim-sneak:noremap <leader>, <Plug>Sneak_,. Now,,works. – Alex Roberts Sep 29 '22 at 18:59,,is too slow when I donoremap <leader>, <Plug>Sneak_,, and \ is inconvenient, so I've now addednnoremap '; <Plug>SneakPreviousto my.vimrc. There is no delay, and it's easy to type';right after typing;. – Alex Roberts Sep 29 '22 at 20:28