Execute commands with notepad++

喜夏-厌秋 提交于 2019-12-03 03:38:26

问题


How can I specify the actual file to process using the Run command in Notepad++. I want for example run pdflatex using the actualfile as input, or the cs compiler, etc. Using the entire path isn't practical, it must works with any actual file.


回答1:


You can automatically add the current file using a variable in the execution string:

C:\temp\test.exe "$(FULL_CURRENT_PATH)" 

The list of available variables is nowhere documented, but you can see it in the source code.

FULL_CURRENT_PATH
CURRENT_DIRECTORY
FILE_NAME
NAME_PART
EXT_PART
CURRENT_WORD
NPP_DIRECTORY
NPP_FULL_FILE_PATH
CURRENT_LINE
CURRENT_COLUMN

See RunDlg.cpp line 77 and line 26



来源:https://stackoverflow.com/questions/4614608/execute-commands-with-notepad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!