Usually, when I want to undo changes when editing text in Vim, I need:
- Exit paste mode with
Esc - Click
uto discard changes. - Enter insert mode with various commands (
i, oetc.)
Now I'm just a beginner, but I understand that in Insert mode you can temporarily switch to normal mode for a single command using Ctrl-O.
Knowing this, when I want to undo changes in the text, I decided: why not just go into the temporary normal mode and press uand not deal with all the fraud Escand switching between modes?
So, I did the following:
- Escape to temporary normal mode for one team using
Ctrl-O - Click
uto discard changes. - I am automatically in Insert mode and continue editing.
It works ... except VERY, VERY. slow The cursor will immediately be placed in the position after cancellation, but changes in the text will not be displayed only after ~ 2 seconds. This is a very long time.
I thought that for some reason my computer was slow, but I did the old school way and the cancellation was done instantly. Of course, this does not apply to all teams. When I try ddand delete the entire line, it works just as expected - instantly.
, : ? , , Esc? - , , - ? undo Vim?