How to go to the last edit location in all buffers in vim?

It’s easy to go to the last edit location in the current buffer. See How to return to lines edited to the last in Vim? The change list is a buffer, each buffer has its own change list. However, very often I move from this recently edited buffer to another buffer, and it would be nice to somehow go back to the last edit location in the original buffer. Is there any way to get back to where the last insert or change occurred?

+5
source share
2 answers

You can do :windo normal ` .

However, I usually just use Co (repeatedly).

If I β€œfeel” that I most likely want to go back to some point, I just delete the mA (which writes the label of the transverse file / buffer), so I can just make ` A from anywhere (even after restarting the editor )


A little off topic, I love :Obsession (Tim Paup) for really long-lived sessions that make a lot of cross-references.

+1
source

Try ctrl - ` (or ctrl - 6 ).

0
source

Source: https://habr.com/ru/post/1211376/


All Articles