rnkn / fountain-mode

Emacs major mode for screenwriting in Fountain plain-text markup
https://fountain-mode.org
GNU General Public License v3.0
391 stars 16 forks source link

Is it possible to arbitrarily (re)format elements, lines, selection, etc? #112

Closed alienbogart closed 4 years ago

alienbogart commented 4 years ago

My Environment

Issue

First of all, thank you all for this great package.

Sometimes I want to force an element to become another. For example, I wanna type "fade in", hit a key a transform the current line into a correctly formatted transition. I wish to do the same with all element types:

This is something I have on other screenwriting tools, and that might be a good addition to fountain-mode. Please forgive me if these features already exist. And again, thanks!

rnkn commented 4 years ago

Are you coming from a screenwriting app where you need to specify the formatting type of each element? Fountain doesn't need to do this. Its syntax is based on what a screenplay looks like, so you can just type and you'll get a screenplay. Take a look at the official syntax guide to see what I mean.

Fountain Mode’s “formatting” is only for aesthetics. It aligns/highlights the text based on the Fountain syntax, but this doesn't change anything in the file itself.

There are a couple of key bindings to upcase a line, which will do what you like for syntax based on lines being all caps, e.g.

C-c C-c runs the command fountain-upcase-line
C-c <return> runs the command fountain-upcase-line-and-newline
<S-return> runs the command fountain-upcase-line-and-newline

You and also do C-u C-c <return> to make a line a forced scene heading.

Specific to “fade in”, this isn’t usually considered a transition element because you’d most likely want it aligned left to begin your screenplay. But if you like, you can force it like:

> FADE IN:

Or you can customise fountain-trans-suffix-list to include FADE IN:.

alienbogart commented 4 years ago

Thank you very much for your answer.

Yes, I have used many screenwriting software before, but I am also familiar with Fountain syntax. It's great. fountain-mode is awesome to the max, but sometimes I need to ingest other peoples' screenplays that come in unfriendly PDF formats, so I copy/paste lots of stuff and end up manually formating a bunch of elements. For those situations, something in the lines of what I proposed might be handy.

It would also be handy for "converting" from other writing standards, such as plays, comics, and overall literature.

Oh: I just tried fountain-upcase-line-and-newline, and it is only inserting newline. No upcasing.

rnkn commented 4 years ago

I see. Given the “looseness” of the syntax, there’s not really much more that can be done. It’s just a case of upcasing lines and inserting new lines, so I’d only be duplicating existing Emacs commands.

n.b. fountain-upcase-line-and-newline only upcases from the beginning of line to point, so you need to be at the end of the line. This is specifically for situations like yours where you may have a character name and dialogue on the same line and only want the former upcased. C-c C-c will upcase the whole line at any point.

Also I know <S-return> won’t translate in console Emacs (it will just be read as RET). This may also be true of GTK. You can check this if you type C-h k <S-return>. Or use C-c <return>.

I assume you’re familiar with C-o for open-line. Also M-<return> for just-one-space is quite useful (I’ve remapped this to cycle-spacing).

alienbogart commented 4 years ago

I see. All good than. Cheers.