Anyone use notepad++ with their compilers?

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
Considering switching to it from Visual C++ for my command line C++ development.

It would also be nice to use it for Java as well (currently using window's notepad and the command line java compiler).


Does notepad++ have an easy way to map the Visual C++ or java command line compiler to a button, so I do not have to go out to the command prompt everytime I wish to compile?

Similar question in regards to the javac.

I played around with it a little, it seems that the run drop down box provides this function, but I cannot seem to get it to work properly. Any quick and easy way to set this program up?

Thanks

(note: I decided to use the software forum instead of programming since this deals with setting up / configuring an existing program rather than coding)
 

nordloewelabs

Senior member
Mar 18, 2005
542
0
0

1. make a batch file that executes the compiler and the files to be compiled.
2. set Notepad++ to run the batch file (menu RUN > RUN...).
3. on the RUN dialog, create a keyboard shortcut for the batch file (SAVE...).

this process isnt too annoying if you work on the same project for a while.
alternatively, get the free Visual C++ Express IDE from Microsoft.
program's registration is free, but note req'd if you d/l the ISO version.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
Thanks nord, no way to have a statement in the run dialog box that links the compiling to whatever text is open in my tab then?

I really wish J# used the latest syntax of java, would be nice to use Visual Studio for everything.
 

stevf

Senior member
Jan 26, 2005
290
0
0
not sure about notepad ++ but I know textpad and crimson editor do. both can be set up to call whatever compiler you need from the menus.

I cant imagine notepad++ not having that built into it - you probably have to set it up as you do in the programs I listed above. I use crimson editor at home because it doesnt nag you like textpad but I have heard good things about notepad++ - I should try it
 

nordloewelabs

Senior member
Mar 18, 2005
542
0
0
i inspected Notepad++ again... i think there are 2 ways to get the compilation and execution done. first method:

1) RUN > RUN.
2) type in the path to the compiler and to the files to be compiled.
3) SAVE the string as keyboard shortcut (eg: CTRL+ENTER).
4) when back on the RUN dialog, type in the path to the compiled executable.
5) again SAVE it as a diff shortcut (eg: SHIFT+ENTER).
6) use the 1st shortcut to compile and the 2nd to execute.

to edit the shortcuts, use SETTINGS > SHORTCUT MAPPER.

the other method i havent had time to try yet, but it would probably work too. it involves using the MACRO menu to record the 5 steps above....

Notepad++ is a great prog, but i've been gradually moving away from it because of the features and zero cost of Visual C# Express.

@Schadenfroh: i think there are free IDEs out there that support both C++ and Java out of the box . if not, a second language can be added via plugin. ask at the Programming forum.
 

Lorthreth

Member
Aug 14, 2004
120
0
86
paint.ruokamo.eu
Notepad++ has a plugin NppExec which can run commands and also supports scripts thus should be more usable than shortcuts. There's also a console dialog to use.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
Trying net beans right now, not bad... one of the main reasons that I like notepad and a command line compiler is that I do not have to create a project with multiple folders / files / solution in order to compile a simple program that just consists of one .cpp or .java file. But, the additional ease of use and features (especially when it comes to stepping through the program) make using an IDE worth my while for more complex situations.