Fountain lexer

All questions regarding lexer highlighting schemes are discussed here...
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Fountain lexer

Post by Alexey »

This is language for writing screenwritings.
Tested lexer on tests folder on github page for Fountain.
It has syntax tree.
Screen -
Attachments
fo2.png
fountain-cud.png
mangobait
Posts: 3
Joined: 15.05.2017 21:16

Post by mangobait »

Thanks for taking an interest in this. I'm sure there are a lot of other screenwriters who'd be interested if you get a good package developed. My main interest is just having a simple, uncluttered environment.

I've used LaTeX since 2004 until I started screenwriting and started using Fountain. The Highland editor is okay but I wanted something that would allow me to expand the language a bit. I tried Emacs and hated the keybindings, tried Spacemacs and loved the Vim keybindings but it was quite klugey so tried out Sublime but it's package for Fountain is incomplete. If someone is willing to work with me, it's pretty simple. The page for it is here: https://fountain.io/

Priorities, in this order:

1) basic syntax highlighting (for me especially important is the three ways of commenting out text and making the comment colour dull enough that I can really ignore it). Maybe if possible a way to have the colours user configurable.

2) some very basic key transformations, e.g. shift+enter makes the line you're leaving all caps. Others could be done at "export" like Highland and Writer do.

3) ways of doing textual analysis. For example: "a way to extract the dialogue for a given character so we can see all instances of when, e.g. STAN speaks. This allows writers to see that the character is speaking in a consistent way and then we can compare with how JOHN speaks (perhaps in columns) so we can see that John uses different language etc than Stan. This would be a really cool feature normally only available on a program that everyone hates and is unreasonably expensive (Final Draft)."

4) exporting the text would be fine but optional because a screenwriter spends most of the time writing and export can be done in other environments; the Highland app has a switch to PDF view and the Emacs mode jumps the text into the formatted place (this bugs some people, maybe me; given the choice I think I'd rather it didn't jump the text around).

If you're interested, my computers are a 2016 MBP 13" with touchbar and a 2009 iMac. Other comments about this whole issue can be found by seeing the posts I've made under the same username on Reddit in the last month or so.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Updated the lexer (many many changes to make it OK for off site docs).
Pls reinstall.
Pls report if lexer does wrong.
known issues: Names hilited not fully ok: some non char/name strings may hilite as char. Parser cannot find empty ln before/after.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

About commenting - see menu Plugins/ Comments/ items here can comment to line end or for range.

To set hotkeys, call F1 dialog, find needed item, press F9 to config.

About making color dull enouth: menu Options/ Settings more/ Theme syntax.
select "Comment" and config it. Save to a new theme "my".
Acticate "my" in Options menu.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

New plugin- Fountain Helper

a) install in AddonManager - "Install from Github" addon
b) run "Plugins - install from github", give it URL-
https://github.com/CudaText-addons/cuda_fountain_helper
it must install this new plugin

Info:
https://github.com/CudaText-addons/cuda ... readme.txt
mangobait
Posts: 3
Joined: 15.05.2017 21:16

Post by mangobait »

So I have it working in the attachments here. There seems to be some work needed on the boneyard comment field /* commented out */ (see: https://fountain.io/syntax#section-bone). There seems to be a key combination that triggers it but it's not bombproof yet. This should definitely be a duller colour; I will work on my config but default it should be dull because this is what the Fountain people consider the comment out field.

The right flush = commenting they actually consider a "synopsis" command so it's a good colour now for that though the Highland app has it a teal (light blue) https://fountain.io/syntax#section-sections

I'm still learning Cudatext so forgive these obvious questions: Can I get rid of that line that comes down the middle of the screen? Also, I like the navigation with the Code Tree but it'd be good to be able to hide all the view options all in one go; eventually that could become a distraction-free mode. Distraction-free modes are very popular. Sublime Text has it and writing apps like Ulysses (https://ulyssesapp.com) and iA Writer (https://ia.net/writer/) have become very popular because of such functions. I found how to turn them all off one at a time but something to do it all at once (and keep it off or toggle it) and even get rid of the left sidebar and the tabs. Writers tend to be distractible. Even something to make the sentence/paragraph where the cursor is a bit brighter and the rest of the page a bit darker would be cool.

And this is a really superficial question but why is the Cudatext icon so low res? Fine in the doc but in switcher (command+tab) it is really low res.
Attachments
Here's my screen with all the view options turned off but there's still that annoying vertical line. And I'd like to be able to hide the tabs and the left nav bar (eventually)
Here's my screen with all the view options turned off but there's still that annoying vertical line. And I'd like to be able to hide the tabs and the left nav bar (eventually)
There seems to be some work needed on the boneyard comment field /* commented out */
There seems to be some work needed on the boneyard comment field /* commented out */
Even here only one of the "boneyard" comment fields transforms.
Even here only one of the "boneyard" comment fields transforms.
mangobait
Posts: 3
Joined: 15.05.2017 21:16

Post by mangobait »

Alexey wrote:New plugin- Fountain Helper

a) install in AddonManager - "Install from Github" addon
b) run "Plugins - install from github", give it URL-
https://github.com/CudaText-addons/cuda_fountain_helper
it must install this new plugin

Info:
https://github.com/CudaText-addons/cuda ... readme.txt
Tried that and got the Install from Github add-on but can't get the Fountain helper thing going. See screenshot. (Also one with the icon resolution question.)
Attachments
Here you can see what I mean by the CMD+TAB switcher view with the low-res icon.
Here you can see what I mean by the CMD+TAB switcher view with the low-res icon.
Having some problems adding that https://github.com/CudaText-addons/cuda_fountain_helper file...
Having some problems adding that https://github.com/CudaText-addons/cuda_fountain_helper file...
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Ok- to install addon, a) download Github repo as zip
b) open this zip in Cudatext- it must show install msg for it.

or 2) Copy folder cuda_fountain_helper to homedir/.cudatext/py
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

>This should definitely be a duller colour; I will work on my config but default it should be dull

hm, comment for C/Java needs such color. It is color in Sub theme. You can change this theme: Options/ Settings more/ Syntax theme ---- change and save as new theme "fo"
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

>annoying vertical line. And I'd like to be able to hide the tabs and the left nav bar (eventually)

options:
"margin": 2000,
"ui_sidebar_show": false,
Post Reply