Skip to content

Instantly share code, notes, and snippets.

@j0rdsta
Created February 15, 2014 09:48
Show Gist options
  • Save j0rdsta/9016901 to your computer and use it in GitHub Desktop.
Save j0rdsta/9016901 to your computer and use it in GitHub Desktop.
Hemingway mode in Sublime Text 3.
[
// Hemingway mode
{ "keys": ["backspace"], "command": "unbound" },
{ "keys": ["shift+backspace"], "command": "unbound" },
{ "keys": ["ctrl+shift+backspace"], "command": "unbound" },
{ "keys": ["delete"], "command": "unbound" },
]
@j0rdsta
Copy link
Author

j0rdsta commented Feb 15, 2014

I quite often use Sublime Text 3 as a general text editor for when I'm doing university assignments and other long-form writing. Recently, I came across Draft, which has this intuitive Hemingway mode, which prevents you from deleting what you've written, in attempt to get you to write first and edit later. Great, challenging idea.

So, since I didn't want to come accustomed to a new (and I suspect paid) writing environment, I don't really know Python that well, and I wanted a quick and easy solution to implementing this mode in ST3, I've simply unbounded all backspace and delete key bindings. When you want to disable this mode, simply comment out the lines, either by the keyboard shortcut for comments (Cmd+/ or Ctrl+/), or by trickily adding the comment yourself.

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment