t9md / atom-vim-mode-plus

vim-mode improved
https://atom.io/packages/vim-mode-plus
MIT License
1.4k stars 111 forks source link

replacing characters via r in .go files does not work in unsaved files #1139

Open xh3b4sd opened 4 years ago

xh3b4sd commented 4 years ago
debug info ```json { "atom": "1.45.0", "platform": "darwin", "release": "19.4.0", "vmpVersion": "1.36.4", "vmpConfig": { "useClipboardAsDefaultRegister": false } } ``` Relevant packages I use: * https://atom.io/packages/go-plus * https://atom.io/packages/autosave

Checklist

You have to check all before open issue.

what I want

reporting a bug

current vs desired behaviour

I have a simple go file, go-plus and autosave enabled. Cursor above x in the comment.

package x

// x

Hitting r and then e replaces x with e. The file changed. Again hitting r and then x does not replace e with x, but it should. When I disable either of go-plus or autosave packages the second attempt of replacing e with x works as expected.

use case

I replace a lot of characters every day and run a lot into the issue for quite some time now. I finally made the effort to report the bug.

more thoughts

I checked the key bindings and they do not seem to be the issue. I tried to debug the JS code but this is not my expertise at all so I couldn't really figure anything. I would maybe be interested in learning a bit more so I can be more helpful here since I rely heavily on vim-mode-plus. I like it a lot.

t9md commented 4 years ago

Thank you for the kind comment. Btw, Have you reported this issue to go-plus? I tried with autosave enabled, but I couldn't reproduce. So I think go-plus is somewhat related to this issue. Plus your debug info is super short, did you pasted the clipboard result which you captured "Vim Mode Plus: Clip Debug Info" command ?

xh3b4sd commented 4 years ago

I did not report it further, but I can raise it with go-plus. I checked the debug info again and it copies the same. I do not get more out of it.

t9md commented 4 years ago

OK, for the Clip Debug Info command, you are right. The length of output just depends on what amount of configuration you have changed from the default.

xh3b4sd commented 4 years ago

Created the other issue. See https://github.com/joefitzgerald/go-plus/issues/1012.