notepad++ 配置命令 运行c语言 c++ java python代码

  1. cmd /

/k:运行结束后保留窗口,继续接收命令(keep)

/c:运行结束后直接关闭窗口(close),不建议单独使用,可在末尾用&连接pause

&:连接不同命令

Pause:暂停,运行结束后等待任意键输入…

Exit:退出,若用/c可不用此命令

Eg.

        Cmd /k ··· :运行完命令继续接收命令

Cmd /k ···& pause :运行完命令等待任意键输入…,接收任意键继续接收命令

Cmd /k ···& pause & exit :运行完命令等待任意键输入…接收任意键后退出

Cmd /c ··· :结果窗口一闪而过

Cmd /c ···& pause :运行完命令等待任意键输入…接收任意键后退出

  1. 通过notepad"运行"按钮,经过命令行显示:

点击运行,然后输入以下命令,保存,设置快捷键,完成

gcc编译运行c:

cmd /k gcc "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & PAUSE & EXIT

g++编译运行c/c+=:

cmd /k g++ "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & PAUSE & EXIT

tcc编译运行c:

cmd/k tcc "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"  & PAUSE & EXIT

gcc编译C:

cmd /k gcc "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"

tcc编译C:

cmd /k tcc "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"

运行C:

cmd /k "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & PAUSE & EXIT

运行python:

cmd /k python "$(FULL_CURRENT_PATH)" & PAUSE & EXIT

编译运行java:

cmd /k javac.exe "$(FILE_NAME)" & java.exe "$(NAME_PART)" & PAUSE & EXIT

编译运行php:

cmd /k D:\wampserver\bin\php\php5.6.40\php.exe "$(FULL_CURRENT_PATH) " & PAUSE & EXIT

  1. 通过notepad的插件excute(F6)编译运行:

gcc编译运行C:

NPP_SAVE

cd "$(CURRENT_DIRECTORY)"

gcc "$(FILE_NAME)"

"$(NAME_PART).exe"

G++编译运行C/c++:

NPP_SAVE

cd "$(CURRENT_DIRECTORY)"

gcc "$(FILE_NAME)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"

"$(NAME_PART).exe"

编译运行python:

NPP_SAVE

cmd /c python "$(FULL_CURRENT_PATH)"

编译运行php:

cd $(CURRENT_DIRECTORY)

D:\wampserver\bin\php\php5.6.40\php.exe $(FULL_CURRENT_PATH)

打开命令行切换到当前目录:

cmd -c “cd -d $(CURRENT_DIRECTORY)

tcc编译运行c :

NPP_SAVE

cd "$(CURRENT_DIRECTORY)"

tcc "$(FILE_NAME)"

"$(NAME_PART).exe"

编译运行java

NPP_SAVE

cd "$(CURRENT_DIRECTORY)"

javac.exe "$(FILE_NAME)"

java.exe "$(NAME_PART)"