codi.vim icon indicating copy to clipboard operation
codi.vim copied to clipboard

Breaking the repeat command

Open davidmh opened this issue 9 years ago • 5 comments
trafficstars

I'm not sure if this is just an incompatibility problem with vim-repeat or the repeat command in general.

Sometimes codi can't replicate the last operation with the dot command.

I can reproduce the issue everytime using vim-unimpaired's ]e to swap lines

With codi off: https://gfycat.com/VapidUnfitCopperhead

With codi on: https://gfycat.com/PoliticalSereneBettong

But it has happened with when replacing matches with cgn, instead of replacing the match, it deletes a couple of lines.

davidmh avatar Sep 08 '16 22:09 davidmh

Thanks for the report. I've just pushed up a fix for g:codi#sync (I had inadvertently broken it. I'll write tests someday!), so would you mind updating your Codi install and trying ]e with vim -c 'let g:codi#sync = 1 | Codi' filename.py? Synchronous should be compatible. Asynchronous behavior still seems broken, but I'm looking into it.

metakirby5 avatar Sep 09 '16 02:09 metakirby5

Yes, it does solve the problem, it moves the cursor to some odd positions, but it's completely functional. Thank you.

Great plugin, btw!

davidmh avatar Sep 09 '16 04:09 davidmh

What do you mean by moves the cursor to some odd positions? Are you sure you have the latest version? I believe I know what you're talking about but I thought I had just fixed that.

metakirby5 avatar Sep 09 '16 05:09 metakirby5

You're right, looks like I only thought about updating the plugin but I obviously didn't.

I did find another problem, this time with the jump commands CTRL-O and CTRL-I. They create empty buffers between jumps.

https://gfycat.com/WaterloggedElasticKarakul

Could it be related?

davidmh avatar Sep 09 '16 06:09 davidmh

Unfortunately, I haven't found a way of buffer switching without adding it to the jumplist. I tried keepjumps, but it didn't seem to work. The ideal solution would be to update the Codi buffer without switching buffers at all, but I don't know of a way to write to a buffer other than the one you are on. If you have any suggestions, please let me know :)

metakirby5 avatar Sep 12 '16 08:09 metakirby5