tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.57k stars 81 forks source link

vim-repeat remaps my custom key #19

Open zkf opened 10 years ago

zkf commented 10 years ago

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).

blueyed commented 9 years ago

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?

blueyed commented 9 years ago

@zkf You might want to try my PR at: https://github.com/tpope/vim-repeat/pull/28

blueyed commented 9 years ago

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

zkf commented 9 years ago

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

PhML commented 8 years ago

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