tpope/vim-repeat

vim-repeat remaps my custom key

zkf opened this issue · 5 comments

zkf commented

Hi

I am having trouble with your plugins vim-surround and vim-repeat. Although I found a dirty workaround I thought you might want to know what the issue is.

The problem is that when I use the features from surround.vim, my u key (which I have remapped) is remapped back to being undo. This happens in repeat.vim.

The workaround I have found is to source repeat.vim just before I set my custom keymappings in .vimrc.

(I tried moving repeat.vim from the autoload directory to plugin, this only results in the u key being remapped when vim starts).

I have a similar problem: I am currently experimenting with nnoremap . : and nnoremap : . to swap : and . (on a German keyboard).

There could be an option, so that vim-repeat could be made to map itself on : instead in my case.

I wonder if there's a way to detect this automatically: while there is hasmapto() which could be used to detect that something else is mapped to ., I could not find a way to get the left-hand-side for this.

@zkf
Do you have another key mapped to u then, similar to my swapping?

@zkf
You might want to try my PR at: #28

FWIW: vim-vinegar also maps the dot and could benefit from any autodetection and redirection of the lhs.

zkf commented

@blueyed I don't remap the u key anymore, so I haven't had any issues for a while.

PhML commented

What is the status with this issue ? I also experiment troubles with the swap of . with :.