Open file from complete path under cursor in Vim
If I have a file that contains a complete path for a file, is there a way to highlight the filename (using visual mode) and open the file (preferably in a split screen)?
Here is the behavior I would like: if the file name contains a /
character, assume it is a full path (ie the current directory is root). Otherwise, use the current folder (ie default behavior). Is this possible?
Put the cursor on the filename and type gf
(in command mode). Or use CTRL+W | CTRL+F to open in another window. See also :help gf
(no, it's not your girlfriend).
gf
命令打开光标下的文件。
上一篇: 使用LINQ选择父对象时排序子对象
下一篇: 在Vim中的光标下从完整路径打开文件