标签:
运行(F5),输入命令并保存
cmd /k python "$(FULL_CURRENT_PATH)" & ECHO. & PAUSE & EXIT
/k 后面跟cmd中类似的命令,可以是python、perl等(已经配置了环境变量,否则需要些完整路径,如:C:\Python34\python.exe)
$(FULL_CURRENT_PATH) Notepad++的宏定义,含义是当前文件的完整路径
ECHO. (或ECHO\) 打印换行
EXIT是退出 CMD.EXE 程序(命令解释程序)
PAUSE 暂停批文件的处理并显示消息.
C、C++编译并运行,类似
cmd /k gcc -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" "$(FULL_CURRENT_PATH)" && CLS && "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & PAUSE & EXIT
cmd /k c++ -o "$(CURRENT_DIRECTORY)\$(NAME).exe" "$(FULL_CURRENT_PATH)" && CLS && "$(CURRENT_DIRECTORY)\$(NAME).exe" & PAUSE & EXIT
Java编译并运行
cmd /k javac "$(FULL_CURRENT_PATH)" && CLS && cd "$(CURRENT_DIRECTORY)" && java "$(NAME_PART)" & PAUSE & EXIT
标签:
原文地址:http://www.cnblogs.com/roronoa-sqd/p/5389285.html