1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Jump Back To The Latest Jump Position as a vim til

This commit is contained in:
jbranchaud
2018-10-19 10:35:32 -05:00
parent 1521636ff1
commit a20c14dc71
2 changed files with 19 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
For a steady stream of TILs from a variety of rocketeers, checkout For a steady stream of TILs from a variety of rocketeers, checkout
[til.hashrocket.com](https://til.hashrocket.com/). [til.hashrocket.com](https://til.hashrocket.com/).
_711 TILs and counting..._ _712 TILs and counting..._
--- ---
@@ -745,6 +745,7 @@ _711 TILs and counting..._
- [Interact With The Alternate File](vim/interact-with-the-alternate-file.md) - [Interact With The Alternate File](vim/interact-with-the-alternate-file.md)
- [Interactive Buffer List](vim/interactive-buffer-list.md) - [Interactive Buffer List](vim/interactive-buffer-list.md)
- [Joining Lines Together](vim/joining-lines-together.md) - [Joining Lines Together](vim/joining-lines-together.md)
- [Jump Back To The Latest Jump Position](vim/jump-back-to-the-latest-jump-position.md)
- [Jump To Matching Pair](vim/jump-to-matching-pair.md) - [Jump To Matching Pair](vim/jump-to-matching-pair.md)
- [Jump To The Next Misspelling](vim/jump-to-the-next-misspelling.md) - [Jump To The Next Misspelling](vim/jump-to-the-next-misspelling.md)
- [List All Buffers](vim/list-all-buffers.md) - [List All Buffers](vim/list-all-buffers.md)

View File

@@ -0,0 +1,17 @@
# Jump Back To The Latest Jump Position
Any sort of jump motion, such as `gg` or `121G`, will be recorded in your
Vim session's jump list. If you'd like to return to the latest position in
your jump list, you can tap `''` within normal mode.
You can then tap `''` again and you'll be returned to the position you were
just at. This is great if you want to toggle back and forth between your
current position and the previous position.
If the latest jump position is not within the current buffer, then you will
be jumped to the initial cursor position at the top of the file.
You can learn more about this by reference `:help jump-motions`, `:help
jumplist`, and `:help ''`.
h/t Jake Worth