From c4d380c266e4355f3a65437874a2fbdbd62e2e5b Mon Sep 17 00:00:00 2001 From: Todd Lewis Date: Sat, 13 May 2017 04:07:47 -0400 Subject: [PATCH 1/4] yaml: handle plain strings w/ non-initial quotes (#25) --- yaml.jsf | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/yaml.jsf b/yaml.jsf index 810d9f5..9d88635 100644 --- a/yaml.jsf +++ b/yaml.jsf @@ -24,10 +24,10 @@ " " line_start :idle Constant - * idle + * plain_scalar noeat "\n" line_start "%" directive recolor=-1 - " " maybe_line_comment + " " maybe_idle_comment "'" string_sq_1 recolor=-1 "\"" string_dq_1 recolor=-1 "{[]}" brace recolor=-1 @@ -35,9 +35,16 @@ "*&" maybe_reference "!" maybe_typecast +:plain_scalar Constant + * plain_scalar + "\t" bad_tab recolor=-1 + "\n" line_start noeat + " " maybe_plain_scalar_comment + :maybe_key Idle * maybe_key1 recolor=-1 mark - "\n%#'\"{[]}*&!" idle noeat + "\n" line_start + "%#'\"{[]}*&!" idle noeat "-" maybe_block1 mark :maybe_key1 Constant @@ -56,7 +63,11 @@ :bad_tab BadTab * line_start noeat -:maybe_line_comment Comment +:maybe_plain_scalar_comment Comment + * plain_scalar noeat + "#" line_comment + +:maybe_idle_comment Comment * idle noeat "#" line_comment From a0f5e7085e0fa5037db966b5b427a22caa81adba Mon Sep 17 00:00:00 2001 From: cn Date: Sat, 13 May 2017 16:57:39 +0200 Subject: [PATCH 2/4] Add terraform keywords and .tfvars file extension --- ftyperc | 5 +++++ terraform.jsf | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ftyperc b/ftyperc index 74ea491..7cc6dce 100644 --- a/ftyperc +++ b/ftyperc @@ -1043,3 +1043,8 @@ -autoindent -syntax terraform -c_comment + +*.tfvars +-autoindent +-syntax terraform +-c_comment diff --git a/terraform.jsf b/terraform.jsf index 5758550..518a8fb 100644 --- a/terraform.jsf +++ b/terraform.jsf @@ -131,10 +131,15 @@ done :ident Idle * idle noeat strings + "data" kw "false" bool "module" kw + "output" kw + "provider" kw "resource" kw + "terraform" kw "true" bool + "variable" kw done "a-zA-Z_" ident From e959814c5cbc5c069cbfe9cb6dd088c1b5241e76 Mon Sep 17 00:00:00 2001 From: cn Date: Fri, 4 Aug 2017 14:32:04 +0200 Subject: [PATCH 3/4] yaml: handle line comments in lists correctly Brought up by https://github.com/cmur2/joe-syntax/pull/27 --- yaml.jsf | 1 + 1 file changed, 1 insertion(+) diff --git a/yaml.jsf b/yaml.jsf index 9d88635..7c5e8e7 100644 --- a/yaml.jsf +++ b/yaml.jsf @@ -51,6 +51,7 @@ * idle noeat ":" key " a-zA-Z0-9_-" maybe_key1 + "#" maybe_idle_comment noeat # necessary to include the : :key Idle From a1f98040332013d8ba83c47b168e9b91f85656c2 Mon Sep 17 00:00:00 2001 From: cn Date: Fri, 4 Aug 2017 16:08:43 +0200 Subject: [PATCH 4/4] Update README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index be1c432..d075921 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # JOE Syntax Highlighting -This directory mainly contains *improved and completely new* JOE syntax files fixing bugs in the original files and adding support for new languages. +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 +### \*.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 download the [latest jsf-bundle](https://github.com/downloads/cmur2/joe-syntax/jsf-bundle_2.tar) and place it's contents into the *syntax* directory (Note: this bundle might be outdated compared to the repository's state). @@ -45,8 +45,8 @@ Files with contributions (or unclear license info): ## Links For JOE see [here](http://joe-editor.sourceforge.net/). -For JOE project see [here](http://sourceforge.net/projects/joe-editor/). -For original JOE syntax files see [here](http://joe-editor.hg.sourceforge.net/hgweb/joe-editor/joe-editor/file/tip/syntax). +For JOE project see [here](https://sourceforge.net/projects/joe-editor/). +For original JOE syntax files see [here](https://sourceforge.net/p/joe-editor/mercurial/ci/default/tree/syntax/). For ne (the nice editor that uses JOE syntax files, too) see [here](http://ne.di.unimi.it/). *You can find this repository [here](https://github.com/cmur2/joe-syntax).*