Open file from complete path under cursor in Vim

后端 未结 2 1314
逝去的感伤
逝去的感伤 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).

    0 讨论(0)
  • 2021-01-02 08:42

    gf command opens file under cursor.

    0 讨论(0)
提交回复
热议问题