Use Notepad++ as your IDE

BlitzMax Forums/BlitzMax Programming/Use Notepad++ as your IDE

SystemError51(Posted 2012) [#1]
Note: Search doesn't work right now (returns a MySQL error), so I don't know if something like this was posted already. If so, apologies.

---

Before I purchased Blide Plus, I was using Notepad++ as my IDE. Now granted, it doesn't have that much features like a full-blown IDE - but if you're more on the minimalistic side of things, Notepad++ can be transformed into something that comes quite close.

For this recipe you need:

1) Notepad++
2) A file with custom BlitzMax commands: Download

And this plugin:

3) NPPExec - Download

You have to extract that zip to a folder you like, and copy all its contents to the subfolder Plugins, which is where you installed Notepad++. Then restart Notepad++.

You don't need anything else.

* Extract the file you got from step 1 somewhere. You'll find an XML file. Open your Windows Explorer, and simply go to "%APPDATA%". It's best if you type it into a browser window or if you hit Windows+R on your keyboard, and type that. If there is no folder "Notepad++", make one. Copy that XML file in there. You now have BlitzMax highlighting (among with BlitzBasic etc) in Notepad++

* Click on View and then Project Panel 1. It'll pop up a panel on the left side. Click on Workspace, then New Workspace. It doesn't really matter how you name it, though I suggest you give it a distinctive name.

* Right-click on the Workspace you created, and click Add New Project. It'll ask you to provide a name. This time, really, give it a good name (you can also rename later - Workspaces you can't rename).

* Right-click on the project you added. Say Add Files from Directory... and select the folder containing your code. You may have to remove files from your project in there that are binaries, such as the .a files and so on. It's up to you.

* In the menu, click on Plugins, NPPExec, and then on Execute.... It'll show you a window inside which you can enter a series of commands that should be run when you want to execute something. This function can be used as a quick shortcut to compile your program. You can save as many scripts as you like - you can switch between them too so that you get multiple compile configurations.

Mine looks like this:



With the "Save..." button you can give that script a name. All your scripts appear in the pulldown menu.

If you want to switch between a "compile configuration", you hit F6. You select the script, and that would be all.

You could also go and extend these scripts to automatically run your compiled program, etc.

* Again in the menu, click Plugins, then NPPExec, and click on Show Console Dialog. It'll bring up a command line row in the lower part of your Notepad++ window. This is useful for the next step.

To compile directly without seeing this box, hit CTRL+F6. If you do that, you can see the output below and all errors bmk has encountered.

----

And that's it... You got a sort-of IDE with Notepad++. It's all working and I couldn't find any critical errors.

So this is how it looks like for me:



Click to enlarge.


Happy Notepad-Plus-Plus'ing!

Last edited 2012


BlitzSupport(Posted 2012) [#2]
Nice! I use Notepad++ so would quite like to try this out, but the UserDefinedLang.zip link gives a 404 error on your site at the moment.


Naughty Alien(Posted 2012) [#3]
..excellent..thanks a lot..


SystemError51(Posted 2012) [#4]
Hi BlitzSupport, Naughty Alien,

thanks :)

I corrected the link for the userDefineLang.zip - had a typo.


col(Posted 2012) [#5]
Execellent!
Thanks for this!

I'll give it a go.


JoshK(Posted 2012) [#6]
No debugging though?


AdamRedwoods(Posted 2012) [#7]
this is way cool! no debugging, but the console works at least.... would be similar to monkey.

I would use this for monkey!


SystemError51(Posted 2012) [#8]
Well Josh, it's Notepad++ :D

I wouldn't know if it is possible to implement that. If anyone knows, please comment :)


JoshK(Posted 2012) [#9]
Sometimes, the debugger will be a standalone application, but then you won't get the editor navigating the a line of code when you click on on a function.


col(Posted 2012) [#10]
Im sure a good look through the MaxIDE source will be the answer as to how its all tied together in there :P

I'd have a look myself and see if it can be done but unfortunately im way too deep in another project right now to side-track.

EDIT:- http://sourceforge.net/projects/blitzmax-ide/. I'm not sure how you'd tie it into notepad++ etc.

Last edited 2012


SystemError51(Posted 2012) [#11]
So I noticed something rather funny. Say you have a DebugLog call somewhere in your code, like

[bbcode]DebugLog("something about the error")[/bbcode]

In Notepad++, you open the NPPExec execute dialog with F6 (or whatever your desired keyboard shortcut is for that), and you put in:

[bbcode]cd c:\dev\blitzmax\bin
bmk makeapp -d -h "D:\Developer\Reason Engine\examples\example10.bmx"
"D:\Developer\Reason Engine\examples\example10.exe"[/bbcode]

Adapt accordingly to your application and paths

You will see the output! Yay! \o/



But! It won't show the actual program at all... no window, no nothing. I see the process in Task Manager though. Interesting.

Note that before I compiled the application, I compiled my module also in debug mode.

Last edited 2012