0

I was wondering if there is any way i could run curl in notepad++

I came across http://net.tutsplus.com/articles/news/cross-browser-css-in-seconds-with-prefixr/ where it shows how to run http://prefixr.com/ in a terminal

Any ideas? Thanks

Abbas
  • 6,720
  • 4
  • 35
  • 49
Patrioticcow
  • 26,422
  • 75
  • 217
  • 337

2 Answers2

1

Use NppExec plugin within Notepad++ to create a script to invoke CURL. I use curl to submit SQL for formatting using following NppExec script.

// 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 data@"$(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-
Paul P
  • 11
  • 1
0

You can download the NppExec plugin which embeds a Command Prompt into notepad++ then run anything you need from the command line.

To get it, go to Plugins -> Plugin Manager -> Show Plugin Manager and find "NppExec"

Griffin
  • 13,184
  • 4
  • 29
  • 43