tommcdo / vim-exchange

Easy text exchange operator for Vim
MIT License
756 stars 23 forks source link

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

Open raveensrk opened 4 years ago

raveensrk commented 4 years ago

For example,

qa
cxiw
move to next word
cxiw
qa

@a
@@
@@

@@ - hangs. 

The macro does not work. But independently cxiw works.

tommcdo commented 4 years ago

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

raveensrk commented 4 years ago

Hi Tommcdo/Vim-Exchange I cannot reproduce this as well. I do not remember which file I worked on while encountering this issue. It was on a different machine. If I encounter the same problem again I will send that sample and vim configs.

On Mon, 19 Oct 2020 at 17:55, Tom McDonald notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tommcdo/vim-exchange/issues/49#issuecomment-712120819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJV6L7HUWEVNL4B6QCPB3JTSLQV2HANCNFSM4SRSHFDA .

piersolenski commented 3 years ago

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?

tommcdo commented 3 years ago

@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?

piersolenski commented 3 years ago

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.