2011-08-06 37 views

回答

0

您可以下载NppExec插件,将命令提示符嵌入到记事本++中,然后从命令行运行所需的任何东西。

为了得到它,去插件 - >插件管理器 - >显示插件管理器,找到“NppExec”

+0

另外,它应该默认安装在新的Notepad ++安装中。 – BoltClock

1

内使用记事本插件NppExeC++创建一个脚本来调用卷曲。我使用curl使用下面的NppExec脚本提交用于格式化的SQL。

// enable $(OUTPUT) variable 
NPE_CONSOLE v+ 
// this temporary file name will be used 
set TEMP_FILE = $(SYS.TEMP)\npp_sel.txt 
// save current selection as ANSI text file 
SEL_SAVETO $(TEMP_FILE) :a 
// POST selection to sql format the selection 
curl -s --data-urlencode [email protected]"$(TEMP_FILE)" -d keyword_case=upper -d reindent=true -d n_indents=2 -d format=text "http://sqlformat.appspot.com/format" 
// open new editor pane 
NPP_SENDMSG WM_COMMAND IDM_FILE_NEW 
// replace the selected text: cmd's output 
SEL_SETTEXT $(OUTPUT) 
// finally, disable $(OUTPUT) variable 
NPE_CONSOLE v-