简体   繁体   中英

To execute make command for different files from vim editor

I have two different independent files opened in vim editor with buffers b1 pointing to abc.c and b2 pointing to xyz.c .

Each of them are in different folders and are having different Makefiles.

Is it possible to execute make command in both the buffers for their respective files?

Currently If I open abc.c from its respective folder, then I can only execute make command for that file ( abc.c ).If the same command is executed in b2 ( xyz.c ),makefile for abc.c is getting compiled.

How should I modify to execute make command of xyz.c ?

一种方法是:set autochdir (或其他选项之一: http :set autochdir ),以便:make将在与源文件相同的目录中运行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM