search

Home  >  Q&A  >  body text

mingw - How to set the saving location of generated files in gvim/vim?

My vim and mingw are installed on the E drive. When I write the c file, the command in vim: w 1.c will generate 1 in E:\vim\vim74 .c, and using mingw also requires gcc + c file location, but the generated a.exe is saved in C:\Users\user>.
Is there any way to make it easier for me to operate? For example, I only need to type the command
w 1.c
in vim Type the command
gcc 1.c
in cmd a.exe

Can it be compiled and run?

大家讲道理大家讲道理2776 days ago629

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 16:42:49

    Use cmd to start vim and mingw, and the target file will be generated in the directory pointed by powershell.

    Or use Linux

    reply
    0
  • Cancelreply