1. Post #1
    Garthex's Avatar
    October 2005
    51 Posts
    Hey everyone.

    This is the release thread for NppGmodLua:
    The widely popular syntax highlighter for Notepad++, performing syntax highlighting for Gmod Lua specific code.

    The project is hosted by Google Code:
    http://code.google.com/p/npp-gmod-lua/
    Please report any problems you encounter or features you would like under the Issues tab.
    Also check out the How-To Wiki page for important instructions.

    Version 1.5 has been released!
    * Revamped plugin for Scintilla's new external lexer interface
    * Did some hacky stuff to keep backwards compatibility
    * Updated keyword list
    * Brought back ANSI version
    - September 16, 2010

    Function List v2.1 is now compatible With NppGmodLua v1.4+

    To install with the Plugin Manager (preferred)
    * Open up the Plugin Manager, checkmark "Gmod Lua Lexer" and click install.
    * Simple, and offers automatic updates!
    * (You can also install manually by following the included install.txt)

    Instructions for Customization:
    * You can edit the color/style of each keyword group within Notepad++.
    * http://code.google.com/p/npp-gmod-lua/wiki/HowTos


    Source files are located in the SVN repository:
    http://npp-gmod-lua.googlecode.com/svn/

    Features
    * Support for [==[ ]==] style comments and quotes as specified by Lua 5.1
    * Improved code to determine numbers.
    * The ability to set C++ and Lua comments as different styles.
    * An XML that is fully customizable to allow you to add up to 9 keyword categories for syntax highlighting.
    * Default keyword groups for instruction words, global constants, global functions, scripted variables, scripted functions, libraries, library calls, object functions, and red flags.
    * Fixed problems with the last line of a document.
    * More intelligent word highlighter:
    * * Spaces between words and period such as file . Write
    * * First checks if word1.word2 is a word
    * * If it isn't, then it checks for word1 and word2 separately.
    * * Allows a colon ( : ) in a word instead of a period.

    Available from the previous syntax highlighters:
    * Folding!
    * A line with either --{, --}, //{ or //} will also fold.
    * Support for both C++ and Lua comments and strings.
    * Customizable styles within the preferences dialog.
    * Escape Character '\' So you can escape the end of a line properly and escape quotes properly
    * Single-line strings when unclosed at the end of a line don't try and parse the rest of the document as a string.



    Alright, there you have it. A syntax highlighter for Notepad++ in plugin form! Enjoy!

    -Garthex
    Reply With Quote Edit / Delete Reply United States Show Events Useful x 19Lua King x 3Lua Helper x 3Dumb x 1Optimistic x 1Winner x 1 (list)

  2. Post #2
    garry's Avatar
    September 2001
    12,412 Posts
    Awesome, thanks for this!

    Edit:

    PS, Rapidshare is blocked for a reason (it sucks)
    Reply With Quote Edit / Delete Reply Show Events Agree x 24Friendly x 8Funny x 3Dumb x 3Winner x 2Informative x 2Lua Helper x 2Artistic x 1Disagree x 1Late x 1Lua King x 1Optimistic x 1 (list)

  3. Post #3
    Gold Member
    elevator13's Avatar
    December 2006
    2,487 Posts
    Looks quite nice.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 2Dumb Dumb x 1 (list)

  4. Post #4
    Garthex's Avatar
    October 2005
    51 Posts
    The links have been fixed. I used rapidshare because, since I have an account, I know the files will still exist in, say, a year. Garrysmod.org works too I suppose =)

  5. Post #5
    Gold Member
    wuzzimu's Avatar
    June 2006
    1,364 Posts
    Thanks.

  6. Post #6
    kevkev's Avatar
    April 2007
    1,093 Posts
    Nice,
    Ill be using this.

  7. Post #7

    July 2007
    12 Posts
    O wow! Thank you ever much for this. I use Notepad++ everyday of my life.
    Reply With Quote Edit / Delete Reply United States Show Events Late Late x 2 (list)

  8. Post #8
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    How do you default .lua files to use gmod 10 lua instead of notepads built in lua syntax highlighting?
    Reply With Quote Edit / Delete Reply United States Show Events Winner Winner x 1 (list)

  9. Post #9
    Garthex's Avatar
    October 2005
    51 Posts
    I've uploaded a file that fixes the problem in Notepad++ where when you open a .lua file it automatically selects "Lua" even if "Lua" is disabled.
    This bug has been submitted to DonHO and should be fixed in the next version.

    To install:
    Unzip and place Notepad++.exe where it belongs in the Notepad++ folder. Be sure to back up the old version. This fix is only intended for version 4.7.3 of Notepad++ found at http://notepad-plus.sourceforge.net/uk/site.htm

    To use:
    Install the Gmod Lua Syntax Highlighter Plugin.
    Then go into Settings > Preferences... > Language
    Menu. Once there locate "Lua" in the left column and move it over to the right column. This disables the default Lua so that it doesn't show up in the menu. Next time you open a .lua file it'll use "Gmod 10 Lua" as long as that's not disabled.




    UPDATE: This problem has been fixed in the most recent version of Notepad++

  10. Post #10
    Gold Member
    takua108's Avatar
    August 2006
    85 Posts
    Going to test it, and some douche has already claimed that NppLuaFix.zip is "unsafe."

  11. Post #11
    Garthex's Avatar
    October 2005
    51 Posts
    I believe it may be an automated system since the zip does contain an exe.

  12. Post #12
    Gold Member
    Metroid48's Avatar
    February 2007
    1,020 Posts
    Probably is an automated response.

    Anyway, this is great! I'll have to test it tomorrow, but this will immensely improve my coding since I always use notepad++ for any serious gmod coding.

    Thanks for another great plugin!

  13. Post #13
    Gold Member
    thegrb93's Avatar
    June 2006
    1,394 Posts
    I put this in to test, but line 2 wasn't highlighted. Is this normal, or did I install it wrong? or am I using it wrong? Is there something I have to do to turn it on?
    function glua_test()
    	fil.Write(file","test")
    end
    concommand.Ad("blah",glua_test)
    
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 5Friendly Friendly x 1 (list)

  14. Post #14
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    thegrb93 posted:
    I put this in to test, but line 2 wasn't highlighted. Is this normal, or did I install it wrong? or am I using it wrong? Is there something I have to do to turn it on?
    function glua_test()
    	fil.Write(file","test")
    end
    concommand.Ad("blah",glua_test)
    
    You have to manually select "gmod10 lua" from the language list
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  15. Post #15
    Gold Member
    dumdum's Avatar
    October 2005
    26 Posts
    Wow, this is awesome.

  16. Post #16
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    I really suggest using the npp patch he posted above, works wonders!

    besides that... Anyone know a good default font? And where are the font settings stored? I sorta messed them up.

  17. Post #17
    Gold Member
    Xera's Avatar
    November 2006
    3,097 Posts
    Nice, very handy.

    garry posted:
    PS, Rapidshare is blocked for a reason (it sucks)
    But are there any better free general file hosts?

    thegrb93 posted:
    I put this in to test, but line 2 wasn't highlighted. Is this normal, or did I install it wrong? or am I using it wrong? Is there something I have to do to turn it on?
    function glua_test()
    	fil.Write(file","test")
    end
    concommand.Ad("blah",glua_test)
    
    Because your code is completely wrong..

    function glua_test()
    	file.Write(file,"test")
    end
    concommand.Add("blah",glua_test)
    
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 3 (list)

  18. Post #18
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    Xera posted:
    Nice, very handy.



    But are there any better free general file hosts?
    Megaupload

  19. Post #19
    Gold Member
    Xera's Avatar
    November 2006
    3,097 Posts
    high posted:
    Megaupload
    Megaupload still makes you wait and it's slow. I get < 100KB/s on a good day, on RS I get my maximum speed(250KB/s)..

  20. Post #20
    Gold Member
    Xera's Avatar
    November 2006
    3,097 Posts
    high posted:
    Megaupload
    Megaupload still makes you wait and it's slow. I get < 100KB/s on a good day, on RS I get my maximum speed(250KB/s)..

  21. Post #21
    Gold Member
    Disarray's Avatar
    October 2006
    1,156 Posts
    high posted:
    Megaupload
    That is like Rapidshit.

    Try http://upl.vs-hs.com/
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 1 (list)

  22. Post #22
    Gold Member
    Termy58's Avatar
    September 2006
    1,724 Posts
    Thanks, needed an update.

  23. Post #23
    Gold Member
    thegrb93's Avatar
    June 2006
    1,394 Posts
    Xera posted:
    Nice, very handy.



    But are there any better free general file hosts?



    Because your code is completely wrong..

    function glua_test()
    	file.Write(file,"test")
    end
    concommand.Add("blah",glua_test)
    
    Its supposed to be, I was testing the syntax highlighting.

    high posted:
    You have to manually select "gmod10 lua" from the language list
    Ohhhh haha, there we go.

  24. Post #24
    Garthex's Avatar
    October 2005
    51 Posts
    How long do files at VS-HS stay?

  25. Post #25
    Gold Member
    tad2020's Avatar
    December 2006
    163 Posts
    Thanks Garthex! I had installed the new version of NotePad++ the other night and I was looking to see if you or someone else had updated this, but I guess I was a few hours too soon.

  26. Post #26
    Garthex's Avatar
    October 2005
    51 Posts
    Yea, the update to Notepad++ to support external lexers was made specifically for this plugin. =)

  27. Post #27
    Gold Member
    tad2020's Avatar
    December 2006
    163 Posts
    I was wondering a while back when it have some way to add additional languages. Now I keep the updates to the default lexer and the GMod difference, plus it fixed all the strangeness I've been having like that annoying shit with the last line. And the built in function list and lua script to rebuild it is great too.

  28. Post #28
    Gold Member
    Robbis_1's Avatar
    July 2005
    344 Posts
    Garthex posted:
    How long do files at VS-HS stay?
    They stay there forever (as long as we don't run out of space T_T). If you make an account, you can easily manage the files too.

  29. Post #29
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    I just set up my new PC and found that addon. Thank you.

  30. Post #30
    Gold Member
    tad2020's Avatar
    December 2006
    163 Posts
    Garthex posted:
    I've uploaded a file that fixes the problem in Notepad++ where when you open a .lua file it automatically selects "Lua" even if "Lua" is disabled.
    This bug has been submitted to DonHO and should be fixed in the next version.
    New version is out, I can confirm that 4.7.5 selects "GMod 10 Lua" for .lua files by default, even with Lua enabled or disabled. All is good.

  31. Post #31
    Garthex's Avatar
    October 2005
    51 Posts
    tad2020 posted:
    New version is out, I can confirm that 4.7.5 selects "GMod 10 Lua" for .lua files by default, even with Lua enabled or disabled. All is good.
    This is not true. He won't be applying the fix until version 4.8.

  32. Post #32
    Gold Member
    tad2020's Avatar
    December 2006
    163 Posts
    Garthex posted:
    This is not true. He won't be applying the fix until version 4.8.
    Well, um, it works now in any case. It didn't in 4.7.3.

    Edit:

    You should update the GmodLua.xml for GMod2007 (aka GMod11).

    Edit:

    You're right, now it's not working again, darn.

  33. Post #33
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    tad2020 posted:
    You should update the GmodLua.xml for GMod2007 (aka GMod11).
    Ya garthex can you update it?

    I tried but it messed up.

  34. Post #34
    Garthex's Avatar
    October 2005
    51 Posts
    I'll let you know as soon as it's acceptable for release.

  35. Post #35
    Gold Member
    DEADBEEF's Avatar
    March 2005
    582 Posts
    Been looking for something like this for a while. I wrote my own a year or so ago but lost the file to a re-format.

    Thanks.

  36. Post #36
    Sechs's Avatar
    November 2005
    350 Posts
    Well done. Someone did a similar syntax highlighting thing to this but it was lost eons ago.



    EDIT: Is it just me or does it not recognize the // comment style?

    //comment
    --comment

  37. Post #37
    Garthex's Avatar
    October 2005
    51 Posts
    In the current release version of Notepad++, opening a new document with .lua will automatically select "Lua" which doesn't recognize // comments. You must manually select the right language when opening a new file. (Which is not necessary when restoring the previous session.) I posted instructions above on how to make Notepad++ select the right language.

  38. Post #38
    Garthex's Avatar
    October 2005
    51 Posts
    Version 1.1 has been released which adds support for the new keywords as well as fixes the keyword generator!

  39. Post #39

    February 2008
    1 Posts
    Hi, can someone point me to a readme or something for this that explains how to get the folding working in Notepad++?

  40. Post #40
    Garthex's Avatar
    October 2005
    51 Posts
    Folding just means you hit the - or + buttons on the left next to the line numbers in a file that supports folding and it hides a set number of lines to hide certain code blocks, such as a function, an if statement, a group of comments, etc. What you are able to fold is determined by the syntax highlighter engine being used and is based on the syntax of the language.