Home Download Buy Blog Forum Support

Typewriter: a plugin for writers

Re: Typewriter: a plugin for writers

Postby quodlibet on Mon Sep 16, 2013 4:27 pm

Thank you very much for testing this out. It works as intended.

(And sorry for crippling your editor. It's a right panic when your cursor keys are misbehaving. Video games used to swap the keys around to simulate drunkenness or weakness.)

I'll be uploading a rough draft of the Typing Mode for OSX later today. I'm doing this a bit blindly, because I haven't been able to really thorough list of text editing shortcuts for OSX. I will need another volunteer (or the same) to test that out when it's ready. And this time there will be an off switch :)

Alex
quodlibet
 
Posts: 460
Joined: Sat Jun 18, 2011 5:53 pm

Re: Typewriter: a plugin for writers

Postby quodlibet on Mon Sep 16, 2013 8:18 pm

I've updated the Typing mode to support OSX. It's 100% untested guesswork at this point.

I would be very grateful if a gentle soul could install Typewriter from the repo [1], turn on Typing mode (via the Palette) and try to move the cursor.

[1]: `git clone https://github.com/alehandrof/Typewriter.git`

In theory, typing mode should only allow you to type alphanumeric characters, punctuation & symbols, enter and backspace/delete. In practice, let me know what happens.

P.S. The Typing mode command is a toggle so you can return your editor to its former state, although it only takes effect per-view.

Alex
quodlibet
 
Posts: 460
Joined: Sat Jun 18, 2011 5:53 pm

Re: Typewriter: a plugin for writers

Postby quodlibet on Tue Oct 01, 2013 7:44 pm

Incidentally, I added this to Package Control as of a couple of weeks ago: https://sublime.wbond.net/packages/Typewriter

I'm still waiting for some nice OSX folk to verify whether the Typing mode works as it should:

quodlibet wrote:In theory, typing mode should only allow you to type alphanumeric characters, punctuation & symbols, enter and backspace/delete. In practice, let me know what happens.


Cheers,
Alex
quodlibet
 
Posts: 460
Joined: Sat Jun 18, 2011 5:53 pm

Re: Typewriter: a plugin for writers

Postby adzenith on Tue Oct 01, 2013 10:48 pm

Just tried it on OS X. I can still press up and down, but that's probably because I have them rebound in my user keybindings.
I can't "undo", but I can "find" - again, probably because I rebound find.
I can still move the cursor with the mouse.
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: Typewriter: a plugin for writers

Postby quodlibet on Wed Oct 02, 2013 5:04 am

Thanks for the report.

If you've rebound keys, then the keymap settings I provide won't know, obviously. What I would really like to do is to temporarily disable commands (such as "move", "find_prev", etc.). I couldn't think of a way of doing that, so I'm just stepping on the default keybindings. I'm still thinking about a Pythonesque solution.

Whether all this is an issue or not for actual writing depends on whether you can resist the urge to use loopholes to go back and edit the text you've written. (Erasing and re-writting is acceptable :) ) The version of this plugin I used for a long time only blocked the cursor keys, which was sufficiently demoralizing for me, but YMMV.

Just out of curiosity, what have you bound up and down to?

Alex
quodlibet
 
Posts: 460
Joined: Sat Jun 18, 2011 5:53 pm

Re: Typewriter: a plugin for writers

Postby bizoo on Wed Oct 02, 2013 8:39 am

quodlibet wrote:What I would really like to do is to temporarily disable commands (such as "move", "find_prev", etc.). I couldn't think of a way of doing that, so I'm just stepping on the default keybindings

In ST3, you can probably use this event:
Code: Select all
on_text_command(view, command_name, args)   (new_command_name, new_args)
Called when a text command is issued. The listener may return a (command, arguments) tuple to rewrite the command, or None to run the command unmodified.

Returning a nonexistent command (like 'blackhole' ;)) will probably cancel the current command and do nothing (didn't try), otherwise you can write your own BlackHoleCommand to trigger instead.
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Typewriter: a plugin for writers

Postby quodlibet on Wed Oct 02, 2013 10:41 am

bizoo wrote:In ST3, you can probably use this event:
Code: Select all
on_text_command(view, command_name, args)   (new_command_name, new_args)


Buwahahaha! This is so brutally effective it's not even funny.

It looks like it also allows me to block mouse events, which I've been wanting to do for the typewriter scrolling mode since 2011.

Thank you @bizoo for pointing this out. I am totally grinning like an idiot right now.

Alex

Edit:
bizoo wrote:Returning a nonexistent command (like 'blackhole' ;)) will probably cancel the current command and do nothing (didn't try)


Indeed, I've been using `do_nothing`.
quodlibet
 
Posts: 460
Joined: Sat Jun 18, 2011 5:53 pm

Re: Typewriter: a plugin for writers

Postby adzenith on Wed Oct 02, 2013 8:36 pm

quodlibet wrote:Just out of curiosity, what have you bound up and down to?

https://github.com/bizoo/SmartCursor
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: Typewriter: a plugin for writers

Postby quodlibet on Wed Oct 02, 2013 8:57 pm

I'd tried one of the first versions of SmartCursor, but I never got the hang of it. IIRC, I had bound it to something I needed to trigger consciously, and of course I never did. But it still sounds intriguing enough to try it again.

I used to be wary of modifying the editor so fundamentally, because the muscle memory would not transfer to other environments. But I've pretty much given up writing text in anything other Sublime. (As the Typewriter plugin indicates.)

Who knew? The Emacs people were on to something...

(It just occured to me that I still have to use Excel on occasion. Boy, does that app need multiple cursors! :D )

Alex
quodlibet
 
Posts: 460
Joined: Sat Jun 18, 2011 5:53 pm

Re: Typewriter: a plugin for writers

Postby bizoo on Fri Oct 04, 2013 7:02 am

quodlibet wrote:IIRC, I had bound it to something I needed to trigger consciously, and of course I never did.

You're right, it's too difficult to use it this way, I couldn't either.

I've bound them to up/down keys one year ago and use them this way since.

It's a hit-and-miss feature, sometimes it does exactly what you want, sometimes it doesn't. But I think that the hit ratio is bigger than the miss ratio.
I don't consciously use this feature, it's just that often you hit the down key and you find that the caret is magically where you want it to be.
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot] and 7 guests