Typewriter mode possible?

413 views
Skip to first unread message

Rainer Krug

unread,
Nov 22, 2021, 5:02:52 AM11/22/21
to BBEdit Talk
Hi

is it possible to have typewriter mode (i.e. the line I am typing in stays in the middle off the screen) in BBEdit? I haven't found anything along these lines. Did I miss it?

Thanks,

Rainer
 

jj

unread,
Nov 24, 2021, 4:21:19 AM11/24/21
to BBEdit Talk
Hi Rainer,

You can "kind of" simulate typewriter mode with this applescript.
It only has effect once your text overflows the window because it takes advantage of the fact that, when jumping around, BBEdit repositions the current line at ± 25% of the window height. 
Note that there is a bit of blinking that I don't know how to avoid.
Save it to the Scripts folder and give it a keyboard shortcut like <Ctrl-return>.

    --
    # ~/Application Support/BBEdit/Scripts/0-[⌃↩︎]-[typewriter_return].applescript
    try
        tell application "BBEdit"
            tell first window
                if class of its selection is not insertion point then
                    return
                end if
                tell its selection
                    set vCharacterOffset to (its characterOffset) as integer
                    set its contents to linefeed
                end tell
                tell its first document
                    select insertion point before its first text
                    select insertion point after its character vCharacterOffset
                end tell
            end tell
        end tell
    on error aMessage 
        display alert aMessage
    end try
    --

HTH,

Jean Jourdain

jj

unread,
Nov 24, 2021, 4:26:57 AM11/24/21
to BBEdit Talk
BTW, you should also set BBEdit Preferences > Editing > 'Extra vertical space ("overscroll") in text view' to 'Full Window'.

Jean

Rainer Krug

unread,
Nov 24, 2021, 6:15:23 AM11/24/21
to BBEdit Talk
Interesting. But I have to use the shortcut ⌃↩︎ to execute the typewriter scrolling - so it is not automatic. Correct?

On Wednesday, November 24, 2021 at 10:21:19 AM UTC+1 jj wrote:

jj

unread,
Nov 24, 2021, 10:14:54 AM11/24/21
to BBEdit Talk
Correct. At the moment, that's all I can think of to try to mimic typewriter mode.

Rainer Krug

unread,
Nov 24, 2021, 10:17:00 AM11/24/21
to BBEdit Talk
Thanks - in this case I will stick with what it is at the moment.

This would probably be to much for my muscle memory.....

Thanks anyway,

Rainer
Reply all
Reply to author
Forward
0 new messages