t9md / atom-vim-mode-plus

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

Undo does not work as expected #1064

Open yasuokav opened 6 years ago

yasuokav commented 6 years ago

I have checked #1018 and #658, but it's not helping.

Steps to reproduce the problem:

  1. Enter insert mode
  2. Input "aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbccccccccccc"
  3. Move to beginning of line
  4. Delete some characters (mac: fn+delete / win: delete)
  5. Exit insert mode
  6. Press "u"

Screenshots:

Vim:

vim

Vim-mode-plus:

atomvim

Is there any setting that can help me?

t9md commented 6 years ago

I understand the behavioral diff you reported, thanks. But I won't fix this minor diff, I even don't think pure-vim behavior for that aspect is exceptional to other undo behavior.

But vmp have option to completely disable grouping changes on leaving insert-mode. By disabling it, you get more granular undo unit. settings_ ___github_memo

bensherman commented 5 years ago

This keeps causing me to lose work, and I don't see a difference with that group changes unchecked. I would expect undo after leaving insert mode to act as cmd-Z does while in it, and that is not what is happening.

bensherman commented 4 years ago

@t9md I got hit with this again and when searching for a solution found my own comment.

I really am confused by the option you say to uncheck, I don't see any difference in behavior, and looking at the source, I don't see it applied anywhere.

How can I make undo act the same in command and insert mode?

bensherman commented 4 years ago

aha! This works exactly correctly when I use o or O to get into insert mode!

When I use i or a to insert or append, the option doesn't do anything, and the "bad" behavior shows up.

Happy to open a new issue if this is not the right place for it.

bensherman commented 4 years ago

I think this got fixed in https://github.com/t9md/atom-vim-mode-plus/pull/1130