2015-10-25 23 views
1

有時我需要重新回到以前訪問過的文件夾(不是父文件夾),讓我們例如:如何返回到先前訪問過的vim文件夾中:探索?

:Explore 
# we at /home/project 
../ 
./ 
foo/ 
bar/ 
file 

# now I press -, hence go to the parent directory /home 

../ 
./ 
project/ 

# now I press - again, hence go to the root/

../ 
./ 
bin/ 
boot/ 
etc 

# and here is the question.. 

如何重新回到初始project/目錄。我期待像bb這樣的b在回到先前的狀態。是否要這樣做?

+1

''有效嗎? (即回到跳轉堆棧中) – FDinoff

+0

Yeaa! F * cking太棒了!)將其作爲答案發布。你在哪裏找到它? –

+0

''也要前進!) –

回答

2

在vim中跳轉的標準方法之一是跳轉列表。從:h jumplist

 
                 jumplist 
Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you 
can go to cursor positions before older jumps, and back again. Thus you can 
move up and down the list. 

我建議閱讀整節以瞭解更多信息。

對於您的使用案例<c-o>應該將您帶回netrw中的上一個緩衝區。

相關問題