简体   繁体   English

Gvim 中的文件导航

[英]File navigation in Gvim

In Gvim is there any way to trace back a series of files opened using "gf"在 Gvim 中是否有任何方法可以追溯使用“gf”打开的一系列文件

File1 <gf> opens  File2 <gf> opens File3 <gf> opens File4 ...

I would like someway to go back to File1.我想以某种方式将 go 回到 File1。 Like Ctrl+6 except for the it toggles between last two files.像 Ctrl+6 一样,除了它在最后两个文件之间切换。

You can map a keystroke to execute :bp你可以 map 一键执行:bp

nmap <keystroke> :bp<CR>

See :h:map for more information.有关详细信息,请参阅:h:map

Like answered by freitass , a solution would be inserting following line in.gvimrc就像freitass回答的那样,解决方案是在.gvimrc 中插入以下行

nmap fg :bp<CR>

gf would navigate forward gf 会向前导航
fg would navigate backward fg 将向后导航

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM