Announcement

Collapse
No announcement yet.

Notepad++ syntax highlighting/autocompletion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Notepad++ syntax highlighting/autocompletion

    I've been using Notepad++ for UnrealScript editing for some time now, and of course created my own user-defined language to highlight UScript. Here's what it looks like:



    I think it should contain every single keyword in UScript, plus it also highlights all the structs and consts declared in Object.uc (vector, rotator etc) and Actor.uc, since they are used a lot. The colour scheme is similar to the one for the script editor that came with older versions of UEd.

    It's not quite perfect e.g. it doesn't highlight hexadecimal numbers fully, and will only highlight the * and / operators if they have spaces on both sides, but I think it's probably as good as Npp will allow. Oh, and you might need to turn off current line highlighting (Settings->Preferences->Editing->Enable current line highlighting), because it doesn't work well with negative colour schemes like this.

    You can download it from Notepad++'s wiki. Use it, and it will make your code more awesome!

    EDIT: I have written an autocompletion file now too, available at the above link along with the syntax highlighting file. This file had to be created manually, so I only added everything in Object.uc and Actor.uc, and it will have to be updated manually if those change in future UDK releases, but it covers a lot of useful stuff - no more struggling to remember in which order the arguments for Trace go!

    #2
    Great stuff - I'm sure loads of people are going to find that handy

    Comment


      #3
      This does not work for me, I probably installed incorrectly ...
      I'm not used to add external syntax, but yet I followed the method described on the sourceforge page.
      In any case thank you for sharing!

      This is what I get :

      Comment


        #4
        Originally posted by Froyok View Post
        This does not work for me, I probably installed incorrectly ...
        To reiterate what it says on the wiki:
        • Find the Notepad++ settings folder (on Win7 this should be C:\Users\[UserName]\AppData\Roaming\Notepad++).
        • Put the downloaded file in there.
        • Rename the file to userDefineLang.xml
        • Open Notepad++.

        You don't have to worry about the more complicated merging procedure because you don't have any other user-defined languages.

        Comment


          #5
          Ho, I understand better now, the problem was that I put the userdefinelang.xml in the wrong place (I directly put the file inside the notepad++ folder).
          Thanks, work fine now ! =)

          [EDIT]
          It's possible to specify at Notepad++ to use the C++ hiligthing with .uc files ?

          Comment


            #6
            Originally posted by Froyok View Post
            ...It's possible to specify at Notepad++ to use the C++ hiligthing with .uc files ?
            Yes, if you go to Settings->Style Configurator, select C++ and put "uc" in the User ext box then it will automatically apply C++ highlighting to UScript files (that won't work while you have the user-defined language associated with the "uc" extension). You will miss highlighting of a lot of UScript-specific keywords though, so if you only want the C++ colours, I would recommend changing the colours of mine instead.

            Comment


              #7
              Originally posted by Mr Evil View Post
              Yes, if you go to Settings->Style Configurator, select C++ and put "uc" in the User ext box then it will automatically apply C++ highlighting to UScript files (that won't work while you have the user-defined language associated with the "uc" extension).
              Thank you !

              Originally posted by Mr Evil View Post
              You will miss highlighting of a lot of UScript-specific keywords though, so if you only want the C++ colours, I would recommend changing the colours of mine instead.
              Ok, I note. But I use this hilighting (manully) since I work on unrealscript language, and it's good for me.


              Ho, just one thing you might add that I have not seen in your hightlighting is :

              (Hightlighting of the the hook)
              It's very useful I think ...

              Comment


                #8
                Updated with autocompletion.

                Comment


                  #9
                  Oh, this is pretty sexy.

                  Comment


                    #10
                    i have downloaded the file from the notepad++ wiki, i have two files, i have copied these two files to C:\Users\[UserName]\AppData\Roaming\Notepad++

                    but nothing happend, i know that i 'm doing something wrong, can you tell me some advice on this ?

                    thank you in advance ...

                    Comment


                      #11
                      place the unrealscript.xml file into the plugins folder and rename the "userDefineLang_UnrealScript" file to "userDefineLang" and place that in the root folder. works for me.

                      Comment


                        #12
                        How do I use the autocompletion, I got the syntax highleter and such to work, but I am having trouble figuring out how to use auto completion or intellisense or w/e its called :P. Thanks guys and nice release

                        Comment


                          #13
                          There are instructions on how to use the syntax highlighting file on the bottom of the same page you can download it from, just below the table.

                          The page on how to create autocompletion files tells you where those should go. Unfortunately it doesn't seem to work if you put it in %APPDATA%, so you have to put it in C:\Program Files\Notepad++\plugins\APIs\, or wherever you installed the program.

                          Comment


                            #14
                            Originally posted by mothphil View Post
                            place the unrealscript.xml file into the plugins folder and rename the "userDefineLang_UnrealScript" file to "userDefineLang" and place that in the root folder. works for me.
                            thank you, now is working ...

                            Originally posted by Mr Evil View Post
                            The page on how to create autocompletion files tells you where those should go. Unfortunately it doesn't seem to work if you put it in %APPDATA%, so you have to put it in C:\Program Files\Notepad++\plugins\APIs\, or wherever you installed the program.
                            just fine, thank you for sharing your tools ....

                            Comment


                              #15
                              Could this work with Context too?

                              Comment

                              Working...
                              X