在 vim 中,如何回到搜索前的位置? [英] In vim, how do I go back to where I was before a search?

查看:65
本文介绍了在 vim 中,如何回到搜索前的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在vim中编程我经常去搜索一些东西,猛拉它,然后回到我原来的地方,插入它,修改它.

Programming in vim I often go search for something, yank it, then go back to where I was, insert it, modify it.

问题是,在我搜索并找到之后,我需要手动找到返回我所在位置的路.

The problem is that after I search and find, I need to MANUALLY find my way back to where I was.

是否有自动返回上次搜索时所在位置的方法?

Is there an automatic way to go back to where I was when I initiated my last search?

推荐答案

Ctrl+O 带我到上一个位置.搜索前不知道位置.

Ctrl+O takes me to the previous location. Don't know about location before the search.

此外,`. 将带您到您所做的最后一次更改.

Also, `. will take you to the last change you made.

这篇关于在 vim 中,如何回到搜索前的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆