Code Monkey home page Code Monkey logo

joe-syntax's Introduction

JOE Syntax Highlighting

This repository mainly contains improved and completely new JOE syntax files fixing bugs in the original files and adding support for new languages.

Using

*.jsf

To enable the .jsf files in this repository they need to appear in JOEs syntax directory, either locally (~/.joe/syntax) or globally. The global syntax directory is is likely to be /usr/share/joe/syntax when using Debian and APT or /usr/local/Cellar/joe/3.7/share/joe/syntax when using brew on Mac OS X. You may either download the contents of this repository as a zip file or clone this repository somewhere onto your hard disk and establish symlinks to all jsf files in the syntax directory, or to install this repository to ~/.joe/syntax and symlink ftyperc appropriately (see below).

ftyperc (only needed to enable new languages)

To enable the enhanced ftyperc from this repository to gain syntax highlighting support for new languages without overwriting /etc/joe/ftyperc, you may place the modified one in ~/.joe/ as ~/.joe/ftyperc.

How JOE syntax highlighting works

See HowItWorks.md which is a reworked version of the header of c.jsf. Another good resource might be jsf.jsf.

Other Syntax Files

Licensing

Every .jsf file from the original repository is under GPL as JOE. There are efforts to move JOE to GPL v2 or any later version.

Every .jsf file created and modified exclusively by me (Christian Nicolai) is under GPL v2 or any later version.

Files with contributions (or unclear license info):

Links

For JOE see here.
For JOE project see here.
For original JOE syntax files see here.
For ne (the nice editor that uses JOE syntax files, too) see here.

You can find this repository here.

joe-syntax's People

Contributors

avli avatar cmur2 avatar iarna avatar ruanpienaar avatar teoric avatar utoddl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

joe-syntax's Issues

Markdown highlight with `[`

Hi,

( Forwarding from https://sourceforge.net/p/joe-editor/bugs/396/ )

Please see the attached test file.

Inside backticks everything is displayed literally in Markdown. Still, an opening bracket present there screws up the rest of the highlighting, in particular, the subsequent list items are not colored in blue in the test file.

Backslash-escaping the bracket fixes joe's highlighting, but breaks the file since it'll show up as a backspace in the rendered version.

joemarkdown.md.txt

ini vs properties

Could you comment a bit about the differences between ini.jsf and properties.jsf? From what I've read, "properties files" are mostly a rebranding of "ini files". I'm considering some changes to ini.jsf, particularly in how it deals with errors. (it seems to handle correct .ini files just fine.) Before I start working on it, I'd like to make sure I understand the contexts of these two .jsf files, as they seem to cover largely the same problem space. Thanks.

json.jsf marks valid number parts as error.

The syntax highlighting of the JSON document

[1.23, 1.2e3]

marks 3 and e3 with error coloring (white on red), but both numbers are valid JSON.
The error is in the following rule:

:integer Number
        *                       end             noeat
        "0-9"                   integer
        "."                     decimalpoint
        "eE"                    exponentpart

The target decimalpoint should be replaced by decimalpart:

:integer Number
        *                       end             noeat
        "0-9"                   integer
        "."                     decimalpart
        "eE"                    exponentpart

I have this also reported upstream, see ticket #376.

enhancements to markdown syntax

I know it's a joke, but still. :)

A number of ideas here:

  1. Bold + italics doesn't quite work. IF I do this, the last * is unbolded. (Um, I escaped that avoid Github's own markdown parsing -- I mean three *s in a row)
  2. Bold or colorize headers -- either lines immediately followed by a line with --- or === (any number), or lines that begin with #.
  3. But three or more -, *, or _ on a line which isn't a headline should be a horizontal rule. I think this might be nicely represented by inverse-color for the whole line.
  4. Color quoted text (lines start with >). Yellow, maybe.
  5. Properly color automatic links like http://example.org/ (maybe just all http:// occurrences, with or without angle brackets?)

funs in erlang syntax.

Anonymous functions displays as a function when writing "fun(bla, bla)" and a keyword when writing "fun (bla, bla)".

JOE 4.5 introduced color schemes

...and somewhat broke old syntax files. Sorry.

In order to support a wide variety of languages with a wide variety of color schemes, syntax files had to be overhauled so that classes could be made more consistent.

Here's an overview of how color schemes and syntaxes interact, and here's a list of the common classes used by both the schemes and the syntax files.

All is not lost, however. Version 4.5 will allow syntax files to specify the 16 basic terminal colors, and map them into the scheme if the scheme supports it. It will not respect any of the extended xterm-256 colors. This was done for backwards compatibility. However, forwards compatibility is impossible; 4.4 and below will fail to read a newer syntax file.

Since we merged many of your syntaxes a few years back, I can provide backports for those changes in the form of a PR. I am also willing to help with upgrading any newer ones. But I thought first I'd open the issue to see what you'd like to do about the issue, especially given the forwards-compatibility problem.

Cheers~

No coloration on MacOS Maverick

Hi,
Impossible for me to get the coloration of any syntax with Joe on Mac OS Maverick.
I have put the syntax as you explained here ;
/usr/local/Cellar/joe/3.7/share/joe/syntax

I'm using ** Joe's Own Editor v3.7 ** so happy to get it on my mac os after using it since 15 years on Linux in the past ... but unfortunatly impossible to get any result with syntax coloration ... how to know where my version of joe really look for the syntax ? Is possible to set the path somewhere ? Not found any answer about this on Internet, and conscient that is not also the right place to ask the question ... but may be someone could help me.

Regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.