Think before you speak, read before you think.

vim打开光标下的文件

by

in ,

当光标在某文件之上时,可以按如下操作直接打开该文件

打开文件在当前窗口open in the same window (“goto file”)

gf

打开文件在新的窗口open in a new window (Ctrl-w f)

<c-w>f

打开文件在新的tab

<c-w>gf open in a new tab (Ctrl-w gf)

参考:

http://vim.wikia.com/wiki/Open_file_under_cursor


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *