tpope / vim-repeat

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

Can't repeat surround with custom remap. #14

Closed pixelastic closed 11 years ago

pixelastic commented 11 years ago

First of all I'm not sure if I should post this in the surround bugtracker or here, so sorry if this is not the right place, I'll move it to the other project if that's the case.

I have remapped my <Space> key to act as a . with the following line : nnoremap <Space> .

Unfortunatly, this does not seem to be working with surround. I cannot repeat my last surround change (tested with ds and cs so far) with <Space> (but it is working just fine with .).

Am I doing something wrong or is that a known limitation of the plugin ?

tpope commented 11 years ago

When you say nnoremap, you are telling Vim "use the original behavior of this command." So it invokes the built-in . rather than the repeat.vim version. Try nmap instead.

pixelastic commented 11 years ago

Thanks, I should have thought of that.