Topic
3 replies Latest Post - ‏2013-02-07T22:01:37Z by SystemAdmin
Ch3
Ch3
26 Posts
ACCEPTED ANSWER

Pinned topic Usrprops Syntax Highlighting

‏2013-01-22T16:57:05Z |
Hi,

After years of editing USRPROPS I finally broke down and created a custom syntax highlighting file. This file works for notepad++ and captures all of SAs USRPROPS syntax.

I've broken it down into 4 categories (only 4 available) roughly based on:
  • actions and qualifiers (e.g. rename, assign, mirrors, visible, key, etc)
  • items (e.g. diagram, definition, symbol, relation, etc)
  • properties and modifiers (e.g. text, oneof, list, etc)
  • formatting (e.g. layout, length, etc)

To use this, open notepad++, View->User Defined Dialogue and import the attached xml. By default it detects .txt as usrprops but you can remove that and assign the language manually when opening a file. This dialogue also allows you to customize the keywords/colours as you see fit.

As usual, this comes without warranty, blah, blah, blah. It is helping me out and I figured I'd throw it back to the community.
Updated on 2013-02-07T22:01:37Z at 2013-02-07T22:01:37Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1061 Posts
    ACCEPTED ANSWER

    Re: Usrprops Syntax Highlighting

    ‏2013-01-23T22:41:53Z  in response to Ch3
    Ch3 - this is fantastic. Notepad++ is my preferred method of editing USRPROPS and I've long wished for syntax highlighting. Thanks a lot!

    One quick addition: the comment delimiter of // seems to work in USRPROPS now, so I recommend adding it to the set of comment line style openers for anyone that uses slashes for comments.
    • Ch3
      Ch3
      26 Posts
      ACCEPTED ANSWER

      Re: Usrprops Syntax Highlighting

      ‏2013-01-24T14:34:41Z  in response to SystemAdmin
      Thanks for the suggestion, I didn't realize it was now an accepted comment format. After I uploaded this I realized I was using an older version of Notepad++. After updating it I was able to call out a couple more styles and fix up some of the section issues I was previously having. I've added:

      • // comment highlighting format.
      • A visibility group (Visible, Invisible, hide, show, etc) - a bright colour to see when something is turned off/on
      • Assignments (e.g. to, like, from, by, etc)

      If you see any major outliers let me know. This version works well with the USRPROPS that I'm maintaining but there may be some elements that we're not currently using. I've found it's useful for collapsing definitions and highlighting matched brackets, if nothing else.

      The previous file will work on Notepad++ prior to version 6.2. This version may require 6.2+ in order to take advantage of the extended syntax definitions.

      Cheers
  • SystemAdmin
    SystemAdmin
    1061 Posts
    ACCEPTED ANSWER

    Re: Usrprops Syntax Highlighting

    ‏2013-02-07T22:01:37Z  in response to Ch3
    Good work!

    Very helpful. I too use NotePad++ and the grouping and color's really help.
    (especially with a large USRPROPS file :-)

    Thanks again,

    Lee