tags:

views:

1902

answers:

1

Hi everybody!

Is there anybody who shows me how to configure nppexec-plugin for Notepad++? I actually want npp to compile my c-files, run them and to show me their output. I already downloaded the plugin, but I wasn't able to configure it. Maybe anyone out there who is able to show me how?

kind regards

+2  A: 

Here's a procedure for perl, just adapt it for C. Hope it helps.

*  Open Notepad
* Type F6 to open the execute window
* write the following commands:
      o npp_save <-- Saves the current document
      o CD $(CURRENT_DIRECTORY) <-- Moves to the current directory
      o perl.exe -c -w "$(FILE_NAME)" <-- executes the command perl.exe -c -w <filename>, example: perl.exe -c -w test.pl (-c = compile -w = warnings) 
* Click on Save
* Type a name to save the script (ie Perl Compile)
* Go to Menu Plugins -> Nppexec -> advanced options -> Menu Item
* In the combobox select the script recently created and click ok -> ok
* Restart Notepad
* Go to Menu Settings -> Shortcut mappter -> Plugins -> search for the script name
* Select the shortcut to use (ie ctrl + 1), click ok
* Verify that you can now run the script created with the shortcut selected. 
David
I found a manual for NppExec in the meanwhile. It's stored in \Notepad++\plugins\docs\NppExec and describes how to create compile-scripts for every kind of source code files. It helped me a lot. Your answer is true as well and probably works fine for perl scripts ( I didn't try it out). I guess it will work too for c-files if you change it. Thank you!
Chris Smullian