Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Vim (Typescript) 编写一个编译项目。make %将构建一个单独的文件。我用它来检查错误。这对于错误检查非常有用,但它会在我不需要的源文件旁边创建编译文件。
make %
对于我的实际构建过程,我有一个编译所有内容的命令。这是在 Makefile 中。
我希望能够以通用方式将一个关键命令映射到“构建我的整个项目”,所以如果我正在编辑.ts我的项目目录下的任何文件,它会运行该特定命令。
.ts
我怎样才能做到这一点?
诀窍是实际使用 Makefile:
all: complete.exe complete.exe: *.ts somecompilation-command $^ -o $@
这样,您就可以makeprg在“make”处离开:
makeprg
:set makeprg&
并愉快地做:
:mak