From c75aa82117161533a6fb4cf6af116eec2a6ed3dd Mon Sep 17 00:00:00 2001 From: Asocia Date: Wed, 25 Aug 2021 07:28:45 +0300 Subject: [PATCH] TIL: Undo branches --- vim/undo-branches.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 vim/undo-branches.md diff --git a/vim/undo-branches.md b/vim/undo-branches.md new file mode 100644 index 0000000..1aee7d2 --- /dev/null +++ b/vim/undo-branches.md @@ -0,0 +1,5 @@ +Most "modern" text editors stores only one undo branch. That means, if you go back in the history and change something, you can't redo. You probably didn't even think about *why* it works this way because all the programs you are using (including the ones that are not for editing text) works like this and you take it for granted. But man, come on we are living in 21st century all we wanted to do is edit some text. It shouldn't be this hard. + +If you understand the problem, I will say Vim for the rescue! Press `g-` or `g+` to go older or newer states in your history. Normal `u` and `C-r` will make you travel your history in a linear way but `g-` and `g+` will show you all possible states. + +Now, forget whatever you are doing and switch to vim.