如何使用默认的pdf应用程序从Vim打开pdf文件



我想在我的osx上预览的默认pdf查看器应用程序中,使用Vim中的文件链接打开pdf文件。

有一个gf的正常命令来打开Vim中的文件链接。但是pdf文件应该在外部应用程序中打开。

正如@Ken在评论中所说,您应该使用gx:

Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
best seen with a special handler (ie. a tool provided with your computer).
Netrw allows one to invoke such special handlers by:
    * when Exploring, hit the "x" key
    * when editing, hit gx with the cursor atop the special filename

更多信息可在:help gx中找到。

这是我的解决方案:Vim-将自定义编辑器设置为打开`.md`'。pdf';文件

我们需要的是还能够打开PDF&已预处理#page=101#chapter_example的MARKDOWN文档。

最新更新