Open file from complete path under cursor in Vim

后端 未结 2 1313
逝去的感伤
逝去的感伤 2021-01-02 08:16

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)?

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-02 08:41

    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).

提交回复
热议问题