The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

[TOOL]Notepad++ for DemigodLua (Lexer added)

By on November 29, 2009 1:32:42 PM from Demigod Forums Demigod Forums

this is the usual notepad++ with another lexer added (LexMohoLua.cxx). this could also be made as a plugin but the interface is too complex to simply create an addon so i recompiled the whole thing which was far easier.

the lexer is just an edited LexLua.cxx to make # comments work and one other slight change so that the functions aren highlighted always (doesnt work 100% and cant be changed without completely changing the code). also all core functions are now being highlighted (like import). i wasnt shure about the [[ comments and if they work so i just let them stay. i can update that whole thing if you guys want to use it.

the download contains the new binaries and also the sourcecode for you to compile yourself and/or review the code.

Thanks to tspauld who found the included functions which are now being highlighted and thanks to Paul Winwood, Alexey Yutkin, Marcos E. Wurzius and Philippe Lhoste who originally wrote and modified the lua lexer.

dont forget to read the readme for the installation instructions. without the new configuration files the whole thing doesnt work or/and may throw exceptions.

backup your files before you replace the old ones!

Demigod Notepad++

+4 Karma | 8 Replies
November 29, 2009 2:10:16 PM from Demigod Forums Demigod Forums

Very Nice!

Thank you

November 29, 2009 6:58:49 PM from Demigod Forums Demigod Forums

Thanks, this is very cool - the power of open source software.

What I've been doing for editing Demigod Lua files in Notepad++ is use the "User-Defined Dialogue" control to create my own highlighting rules.  It lets you define keywords and comments and a few other things, and choose the colors you want.

Download my userDefineLang - moholua.xml

You'll have to rename it to "userDefineLang.xml" and it goes in "C:\Users\[username]\AppData\Roaming\Notepad++", or probably "C:\Documents and Settings\[username]\ApplicationData\Notepad++" on older Windows versions.  And if you already have an existing custom language defined you'll have to merge the contents.

There are probably a few issues still, but this should at least get the highlighting right for comments - both single- and multi-line - and the Demigod functions.

November 29, 2009 10:36:51 PM from Demigod Forums Demigod Forums

btw, I've been using GVIM to edit the lua files.  Works great if you know how to use VI.

November 30, 2009 11:46:09 AM from Demigod Forums Demigod Forums

tspaulds work is propably better because you dont need updated executables and it has almost the same functionality. i didnt know that notepad has this function.

anyway, i fixed two bugs.

1. folding works now. it doesnt 'see' code which is outcomented anymore

2. the moholua files that were loaded last time you worked on are now being loaded with the right lexer on the next start

 

Demigod Notepad

November 30, 2009 11:50:30 AM from Demigod Forums Demigod Forums

Derog, can you please make an installer for this mod?

I am having trouble installing it manually

November 30, 2009 12:57:29 PM from Demigod Forums Demigod Forums

sry, no i cant. i dont know enough about notepad or installers to create one because i have never done that before. i uploaded a version that doesnt need to be installed and has everything onboard, but it seems to work only if notepad aint installed. else it tries to load the xml files from the installed version which of course doesnt work!

i also included the user defined language made by tspauld

 

notepad to run on usb sticks

November 30, 2009 1:02:10 PM from Demigod Forums Demigod Forums

Oh ok, thank you.

So if i uninstall notepad++ and download yours, it will work without an installation or any proccess?

Edit: Also, if I download this, cant i just copy paste it on top of my installed notepad++ inside the Program Files?

Stardock Forums v1.0.0.0    #108434  walnut1   Server Load Time: 00:00:00.0000266   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.