Closed CyberMango closed 6 years ago
I confirmed behavior, ya could reproduce. But I don't want to say that behavior as BUG. As far as I understand, starting replace-mode directly from insert-mode is not allowed in pure-Vim. Replace-mode should be started from normal-mode always.
So If I work to fix this bug, I will fix by disallowing starting replace-mode from insert-mode.
On the vim on my Ubuntu machine, pressing the key 'Insert' while in insert mode starts Replace mode, and while in replace mode it starts insert mode (basically, it transitions between the two). Im not sure if this is a built in behavior of vim or just a configuration on my machine. i cant check this today, but i will do it tomorrow when i can.
Oh, thank you for interesting input. I didn’t know that. So, i changed my mind. Will find the way to shift mode between insert and replace directly.
Implemented and also added vim-mode-plus:toggle-replace-mode
utility command.
This command works only in insert-mode
to switch between insert
and insert.replace
mode(ya, replace
mode is submode of insert
, so this command of cource works in replace
mode too)
'atom-text-editor.vim-mode-plus.insert-mode':
'ctrl-cmd-r': 'vim-mode-plus:toggle-replace-mode'
will release in next version v1.28.0, maybe in a week.
atom --version
), vim-mode-plus version, and OS version(e.g. macOS Sierra 10.12.3).Atom ver: 1.23.3 VMP ver: 1.27.0 OS ver: windows 10 10.0.14393
There is a bug when in insert mode, you use the command 'activate-replace-mode', and then go to normal mode, the cursor position moves 2 chars back (instead of just 1 char). If you do repeatedly move from insert to replace mode and back using 'activate-insert/replace-mode' commands, then the cursor will move more chars back (equal to the number of times you switched)
video example: https://www.youtube.com/watch?v=-ApDhIUmvuY&feature=youtu.be
in the video i show how it acts normally when you just switch from insert/replace to normal mode, then with a single transition from insert to replace, and the cursor jumps 2 chars back. then i make multiple transitions and the cursor jumps a few chars back.
This is useful for making some keybindings and custom actions, and i dont think its a hard issue to fix (correct me if im wrong).
TY for your awesome work so far.