如何在滚动,选择或PgUp / PgDn之前恢复Vim中的光标位置?
在向上滚动查找顶部内容之前,我已经厌倦了寻找自己的位置。
是否有类似“上一个光标位置”和“下一个光标位置”命令的命令(例如用于常规撤消/重做的“ u”和“ R”)?
示例:查找源文件中间的某个位置(不进行编辑),然后跳到顶部(1G
),然后找不到之前的位置。当然,没有标记。(我知道我可以使用“:sp”同时查看多个位置)。
更新。问题仍然悬而未决,我已经收到了跟进:
The answerers didn't understand your question and the answers were too weak of a solution. c-o & c-i don't work for movements.
If I understood correctly, I find that your question was un-answered and that you were looking for a solution for a scenario like this:
As I am vim beginner I frequently do incorrect movements and actions and would like to undo them as though I had never pressed anything, returning to my previous editing location before I started messing up.
那么,是否有任何标准或非标准的方法(涉及Vim或Vim扩展的补丁程序)使它记住光标的移动历史?