mirror of
https://github.com/jbranchaud/til
synced 2026-01-05 08:08:02 +00:00
Add Buffer Time Travel as a vim til.
This commit is contained in:
@@ -66,6 +66,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
|||||||
|
|
||||||
### vim
|
### vim
|
||||||
|
|
||||||
|
- [Buffer Time Travel](vim/buffer-time-travel.md)
|
||||||
- [Close the Current Buffer](vim/close-the-current-buffer.md)
|
- [Close the Current Buffer](vim/close-the-current-buffer.md)
|
||||||
- [Count the Number of Matches](vim/count-the-number-of-matches.md)
|
- [Count the Number of Matches](vim/count-the-number-of-matches.md)
|
||||||
- [Generate and Edit Rails Migration](vim/generate-and-edit-rails-migration.md)
|
- [Generate and Edit Rails Migration](vim/generate-and-edit-rails-migration.md)
|
||||||
|
|||||||
20
vim/buffer-time-travel.md
Normal file
20
vim/buffer-time-travel.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Buffer Time Travel
|
||||||
|
|
||||||
|
Vim allows you to go to an *earlier* text state for a buffer with
|
||||||
|
`:earlier`. For instance, if you want to see the state of the buffer from 10
|
||||||
|
minutes ago:
|
||||||
|
|
||||||
|
```
|
||||||
|
:earlier 10m
|
||||||
|
```
|
||||||
|
|
||||||
|
Similarly, you can move back toward the present text state of the buffer
|
||||||
|
with `:later`. If 10 minutes earlier was too far, you can come back 5
|
||||||
|
minutes like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
:later 5m
|
||||||
|
```
|
||||||
|
|
||||||
|
I encountered these in [Nick Nisi's 'Vim +
|
||||||
|
Tmux'](https://www.youtube.com/watch?v=5r6yzFEXajQ) talk.
|
||||||
Reference in New Issue
Block a user