From 033236270b488a84f0d9ac71b05d28d7a44e6be9 Mon Sep 17 00:00:00 2001 From: Asocia Date: Tue, 24 Aug 2021 22:03:08 +0300 Subject: [PATCH] TIL: Travelling through time --- vim/travelling-through-time.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 vim/travelling-through-time.md diff --git a/vim/travelling-through-time.md b/vim/travelling-through-time.md new file mode 100644 index 0000000..b3695cb --- /dev/null +++ b/vim/travelling-through-time.md @@ -0,0 +1 @@ +In vim, you can travel through time! Today I have done many changes to multiple files and I didn't want to press `u` tens of times to undo it. I thought there should be a better way. And there is. It was 6 PM and I wanted to go to 10 AM. That's 8 hours. And the command I need to run was: `:earlier 8h`. OH. MY. GOD. How simple was that? And guess what would I needed to run if I want to go back to 5 minutes before or maybe 4 days? `:earlier 5m` or `:earlier 4d`. And then use `:later ...` to go forward. Example: `:later 45s` to go 45 seconds forward. I am speechless.