lmparppei / Beat

Beat - a simple and elegant screenwriting app for macOS
Other
175 stars 30 forks source link

Suggestion: up/dn arrow moves a paragraph/block of lines #115

Closed ftolsson closed 2 years ago

ftolsson commented 2 years ago

So it may well be that I have spent too much time in VSCode lately.

But one shortcut that I repeatedly find myself trying to use in Beat is the ALT + arrow one. I think it would be tremendously useful for moving, say, a chunk of dialog, or an action line, up and down. Instead of the usual selecting, cutting, repositioning, pasting.

Behavior: If no selection, ALT + arrow moves entire line (paragraph) that has the caret. If selection spans more lines/paragraphs than one, ALT + arrow moves all entire lines that have selection. Every press of ALT + arrow moves the chunk one line/paragraph up/down.

Never seen it in a screenwriting app, but I believe it would be a wonderful addition.

lmparppei commented 2 years ago

This is a nice idea, but after doing a test with it, I'd change the implementation to move paragraphs and blocks, rather than individual lines. So if you'd press alt-up inside a dialogue block, the whole block of dialogue would move up by one paragraph:

Some text.

                    CHARACTER
            Dialogue.

Would become:

                    CHARACTER
            Dialogue.

Some text.
ftolsson commented 2 years ago

Ah! That's probably the smartest for many reasons -- not least the reformatting and reflow of stuff that would happen as one line travels through in between other lines that dictates certain formatting. Your implementation sound less messy (and probably more useful!)

(And in my defence, the nomenclature is a bit hard here -- even I didn't really mean actual lines but rather line objects, like what we would get out of a line.string object in the API. But again, your block idea may probably be better!)

So -- yay! And yeah! And yay!

dimkanovikov commented 2 years ago

One more interesting thing you may be like - is a cut/copy/paste in a paragraph with cursor and without selection which applying to the entire paragraph.

lmparppei commented 2 years ago

One more interesting thing you may be like - is a cut/copy/paste in a paragraph with cursor and without selection which applying to the entire paragraph.

This is an excellent idea, too.

I'll have these work with ctrl: ⌃⌘-C, ⌃⌘-X for paragraph copy/cut and ⌃⌥-up/down for moving paragraphs around.

lmparppei commented 2 years ago

Implemented in 1.94.9