tommcdo/vim-exchange

Swapping words hangs after 3 times when used as part of a macro

raveensrk opened this issue · 5 comments

For example,

qa
cxiw
move to next word
cxiw
qa

@a
@@
@@

@@ - hangs. 

The macro does not work. But independently cxiw works.

Hey @raveensrk, I'm unable to reproduce this. Can you provide a sample file that I can test it on?

I also can't get this working, either as a macro or a key map. Ideally I want to do something along the lines of <leader>x cxiw<cr> in order to be able to quickly swap words - is this possible?

@piersolenski I'm not sure I understand the use case you're describing, and I wonder if it's the same issue as reported here, or perhaps something different. Can you go into a bit more detail?

Say I want to exchange two words, using cxiw on the first and then cxiw on the second works. However, if I assign this to a keymapping, say nnoremap <leader> x cxiw or use it in a macro, nothing happens. But, like in the initial ticket, independently cxiw works.