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

如何使用默认pdf应用程序从Vim打开pdf文件?,pdf,vim,Pdf,Vim,我想在默认的pdf查看器应用程序(在我的osx上预览)中,使用Vim中的文件链接打开pdf文件 有gfnormal命令指向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 you

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


gf
normal命令指向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
更多信息可在中找到。

这是我的解决方案:


我们需要的是也能够打开PDF和降价文档,这些文档包含
#page=101
#chapter\u示例

gx
是您要找的,但是需要
netrw
@Ken,因为netrw与Vim捆绑在一起,这是正确的答案。考虑将它作为一个答案。@ SPICE我配置<代码> NETRW 使用根据文件扩展名打开的指定外部程序!检查我的答案。