Better syntax highlighting

  • siodine

    siodine - 2012-03-02

    Suggestion: add better syntax like so:

    from sublime text 2

  • Han Joosten

    Han Joosten - 2012-03-03

    @Siodine:  I had a brief look at this syntax highliter, but could you explain what exactly is 'better' in the picture above? I am pretty sure that being more specific would help a lot….

  • siodine

    siodine - 2012-03-03

    As you can see, it has highlighting options for the following where eclipse doesn't:

    * Type constructors in the type signature; see how JSON, String, Result are italicized in the signature of decode
    * The type constrictor; JSON is green in the signature of decade
    * The function name; decode is green
    * Qualified imports are highlighted in purple
    * Library function calls have separate colors from modules and types
    * Modules and types are separate
    * $ and monads are considered part of the "symbols" highlight
    * infix ;see "instance MonadPlus Result…" where `mplus` is highlighted
    (I'm sure I'm missing a few others)

    These options might not seem immediately useful, but they save time in scanning through unfamiliar code.

    Also, sublime text has better handling of indents. Backspacing on tabs in sublime moves a tab back instead of a space (and the sublime tabs are made with spaces). Also, writing something like "showJSON = JSBool" then returning will leave you indented on the next line with the 's' in 'showJSON', while pressing enter after the '=' in "= JSBool" will leave you one indent forward of the 's' in 'showJSON'. The indent guides are nice, too.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks