jcszymansk / jota-text-editor

Automatically exported from code.google.com/p/jota-text-editor
0 stars 0 forks source link

Contribution for Jota Text Editor: Emacs Org-mode keyword file for Org markup's main structure highlighting #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Dear sirs,

I'm a long time user of Jota Text Editor and Emacs Org-mode. I've been testing 
an Emacs Org-mode keyword file for Jota Text Editor, and would like to 
contribute it for other users as public domain, since I'm finding it really 
useful.

The org.conf keyword file is already done and working well, but I can explain 
it a little. This file, attached to this message, includes the following lines:

blue=^\*{1}(\*{5})* [^\n]*|\n\*{1}(\*{5})* [^\n]*
yellow=^\*{2}(\*{5})* [^\n]*|\n\*{2}(\*{5})* [^\n]*
magenta=^\*{3}(\*{5})* [^\n]*|\n\*{3}(\*{5})* [^\n]*
red=^\*{4}(\*{5})* [^\n]*|\n\*{4}(\*{5})* [^\n]*
green=^\*{5}(\*{5})* [^\n]*|\n\*{5}(\*{5})* [^\n]*

These reproduce, basically, Emacs Org-mode behavior for its main structure (in 
Org markup for text files with ".org" extension), giving colors to the 
unlimited nested levels of headlines/projects/to-dos, which start lines with 
one or more "*" according to the different levels:

* Heading, level 1
** Heading, level 2
*** Heading, level 3
Etc...

In org-faces.el (an Org-mode source file) we can see the default colors for 
each level when using light background, according to the number of available 
colors:

1. Blue1, Blue
2. DarkGoldenrod, yellow
3. Purple, Purple
4. Firebrick, red
5. ForestGreen, green
6. CadetBlue, magenta
7. Orchid, blue
8. RosyBrown, green

And cyclically repeating for levels 9, etc.

In the org.conf keyword file I've used the five colors currently available for 
Jota (of course it would be nice to have some more, like purple, etc., but for 
now these work fine):

1. blue
2. yellow
3. magenta
4. red
5. green

And also cyclically repeating for levels 6, etc.

Probably this explanation was not needed, since the org.conf keyword file is 
already working well.

For more information, see for example:

Wikipedia: Org-mode
http://en.wikipedia.org/wiki/Org-mode

Org mode for Emacs: あなたの生活をプレーンテキストで (in 
Japanese)
http://orgmode.org/ja/

I hope the keyword file will be useful for those Jota users who, like me, sync 
.org files between Android smartphones or tablets, and computers with Emacs and 
other Org-compatible applications (Vim, Sublime Text...).

Sincerely,

Juan M. Gonzalez

Original issue reported on code.google.com by juanmgon...@gmail.com on 7 Dec 2013 at 4:39

Attachments:

GoogleCodeExporter commented 8 years ago
Attached version 0.02: Added highlighting for drawers and properties, with the 
line:

blue=^\s*\:\S+\:|\n\s*\:\S+\:

The Org Manual
http://orgmode.org/org.html#Drawers
http://orgmode.org/org.html#Properties-and-Columns

I think this is an already very useful start, and people can add more 
highlighting in future versions of this Jota file.

Original comment by juanmgon...@gmail.com on 10 Dec 2013 at 12:12

Attachments:

GoogleCodeExporter commented 8 years ago
Dear Juan,

thank you for sharing this, I'm currently using your highlighting 
configuration. Do you still use Jota + org-mode files? I'm wondering if there 
is a way to enable hyperlinking and folding. Maybe one could write a Jota 
extension for this?

Best,
Felix

Original comment by felix11h...@gmail.com on 24 Jul 2014 at 11:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Felix, yes, I'm still using the same basic highlighting with Jota for synced 
org files on Android. Simple but really useful for me. I don't know about Jota 
extensions beyond highlighting, however some popular desktop text editors, such 
as Vim and Sublime Text, have org-mode extensions, so I guess it would be also 
possible for Jota in some way. I'm just an user, probably it should be 
suggested to the Jota developers.

Original comment by juanmgon...@gmail.com on 24 Jul 2014 at 7:02