1、`.,这个在vim和idea都好用,所以推荐使用这个。
https://vi.stackexchange.com/questions/2001/how-do-i-jump-to-the-location-of-my-last-edit
The ` goes to a mark, and . is a "special" mark which is automatically set to the position where the last change was made. See :help `. for some more information.
There is also `` which will bring you back to where the cursor was before you made your last jump. See :help `` for more information.
2、在idea里,gb跟好用(可以找到两个过去的编辑位置)。
3、在vim里,g;, gi 都可以使用,但是还是有点琢磨不准。
1、g; 或者 g, 或者 gi,其实都是操作:changes里的内容。
2、第一次按g;,跳转到的是:changes里面index=0(最下面)的地方,再次按,到下一个edit位置(但是只能在文件内移动)。
转载请注明:牛哥678 » vim: 上一次编辑的位置