【问题标题】:How to regexp in vim to open a compile pdf如何在vim中使用正则表达式打开编译pdf
【发布时间】:2023-03-04 17:05:01
【问题描述】:

我试试

:! pdflatex file.tex && xdg-open file.pdf

一般来说,使用 '%' 命令,如何在 vim 中使用 regexp 将扩展名 .tex 转换为 .pdf?

:! pdflatex % && xdg-open ??

【问题讨论】:

  • 您的要求非常不清楚。

标签: regex linux vim latex tex


【解决方案1】:

您可以使用:r<%(当前文件名)来删除扩展名。

:!pdflatex % && xdg-open %<.pdf

如需更多帮助,请参阅:

:h c_%
:h filename-modifiers

【讨论】:

    猜你喜欢
    • 2021-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-23
    • 2010-09-17
    • 2013-01-23
    • 2023-03-15
    相关资源
    最近更新 更多