Coder Social home page Coder Social logo

mattmccray / fountain-sublime-text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from poritsky/fountain-sublime-text

0.0 2.0 0.0 252 KB

An attempt at getting the Fountain syntax highlighting working in Sublime Text 2.

Home Page: http://candlerblog.com/2012/09/10/fountain-for-sublime-text/

fountain-sublime-text's Introduction

Fountain for Sublime Text

This is an attempt to get the Fountain screenwriting syntax working in Sublime Text 2. This repo should work in TextMate as well, but the main testing is on Sublime Text 2 on a Mac.

Initial work on Fountain.tmlanguage created by Sublime Text forum use "nick" in this post.

About Fountain

Fountain is a simple markup syntax for writing, editing and sharing screenplays in plain, human-readable text. Fountain allows you to work on your screenplay anywhere, on any computer or tablet, using any software that edits text files.

Fountain is supported by a growing list of apps. Syntax highlighting is currently supported in Vim, TextWrangler and BBEdit. Brett Trepstra's Marked can be configured to work with Fountain files.

Installation

  1. Download and unzip this repo.
  2. Rename folder to Fountain and move to ~/Library/Application Support/Sublime Text 2/Packages.
  3. Restart Sublime Text 2.
  4. Write the next Chinatown.

Notes

  • Feel free to delete the img folder and README.md once you're up and running.
  • Alternatively, you could clone the repo to the same location listed above.

What Does it Do?

Fountain for Sublime Text adds syntax highlighting when editing .fountain documents. Currently supported highlight elements:

  • Title Page
  • Scene Headings
  • Characters
  • Parentheticals
  • Transitions

Note that Fountain.tmlanguage supports much more of the syntax, but Fountain Classic.tmTheme only calls on the elements listed above using their custom scopes.

Customizations

The Fountain.sublime-settings files contains a number of customizations to make Sublime Text 2 a bit more writer friendly. It also defaults to using Fountain Classic.tmTheme for syntax highlighting. This is a take on the included Mac Classic theme but using Fountain specific scopes. This isn't the most elegant solution, but it works for now.

In general Color Schemes will need to be customized with Fountain specific scopes which is why I'm including this relatively bare theme.

What Doesn't Work?

The Fountain syntax supports indentations, but this theme does not support tab-indented character lines. (Space indents work fine, and Fountain.sublime-settings contains a line turning tabs to spaces.) If you, for example, tab indent characters and dialogue, they will not be highlighted. This has no effect when converting your document with other software, such as Highland.

Help, Please

I spent about a day playing around with this to get the ball rolling, and I will continue fiddling with it. But if you know what's causing some of the current problems or ways to make this load cleaner, I'd appreciate it very much. Specifically, I'd like this to work with any color scheme, not customized ones. Also, if character and scene completions could be implemented, this would be a much better solution for nerdy screenwriters.

Screenshot

Sample Image

Thanks

John August and Stu Maschwitz jointly came up with Fountain and help maintain it. Brett Terpstra's MarkdownEditing project served as the basis for how to customize ST2 for a specific syntax. Oliver Taylor's now deprecated Screenbundle TextMate Bundle was an inspiration for getting this off the ground.

fountain-sublime-text's People

Contributors

mattmccray avatar

Watchers

 avatar  avatar

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.