Our Sublime Text 2 Plugin Now in Public Beta
Posted by Write.app on 01/20/2013
Update: The plugin has now officially been added the Sublime Text's Package Control Channel so you can install it through the app itself
I created a Sublime Text 2 plugin for Write.app last month and after learning Python and the Sublime API plus lots of testing and bug fixes I'm happy to announce the first version is ready for public use! You can now save notes to Write.app directly from Sublime Text! Here's how to get it and how it works...
Note: I assume that if you're using Sublime Text you're already somewhat technically inclined so I won't go into too much detail but this guide should get you going quickly and easily
Using the Package Control plugin
I submitted the plugin to the official Package Control Channel and it was just approved. The maintainer asked me to fix one bug, which I did, and now the package
should be added within the next few days is available.
To add the plugin from Package Control, run the following while in Sublime Text:
Press 'Ctrl+Shift+P' (you may need to use the Cmd or "Super" key if on a Mac)
Now just search for Write.app, highlight it, and click or press enter. That's it! It's now installed. If you can't find the package that means it hasn't been added yet and you'll need to install the plugin manually or using Git. Or you can simply wait as the package will be added soon.
I recommend you install via Git in order to easily get the latest updates but any manual method will work. Please note that if you manually install the plugin you'll need to check for updates yourself. Package control will upgrade the plugin automatically - this is a working beta and will be updated somewhat frequently so unless you know you'll be good about checking for updates you should use Package Control to install.
To install without Git:
Go to https://github.com/WrtApp/Writeapp and download the zip file.
Unzip the file and place the resulting folder in your /Packages directory. On Mac this is located in your Library/Application Support/Sublime Text 2/Packages folder. On Windows its similar but may be in Program files instead of Application Support. Again, I assume ST2 users are pretty technically literate so I'm sure you'll find it but definitely email us at email@example.com if you have issues.
- That's it. You can now use the plugin.
To install via Git:
'cd' into your Packages folder in a command prompt.
Run 'git clone https://github.com/WrtApp/Writeapp.git
- The plugin is now installed.
Note: Currently you must save the file to disk before sending to Write.app. This may change in the future
Set up your Writeapp credentials:
Go to Preferences > Settings - User
- Add the following to your preferences file:
"writeapp_user": "yourUsername", "writeapp_pass": "yourPassword"
Now you're ready to rock.
- With any file open, press 'Alt+s'. Your note has been saved!
Confirming your note was saved:
In the status bar, it'll show a success message after sending your note to Writeapp. However, sometimes you can't trust that message. To see the full response from Write.app, press Control + the back tick key. This will open a small window similar to a terminal window. In this window you should see that Writeapp has responded with the text "Success" and the request headers. If anything failed you'll see an error message explaining why your note was not saved.
Setting titles and other options:
If you save a note as-is Write.app saves it in your default notebook, as an Untitled note, and set to private. However you can control these settings within your note by adding YAML front matter to your note. If you've ever used Octopress for blogging this will be familiar to you.
Here is how to set up options for any note saved using the plugin:
At the top of your note, before anything else including white space, add the following YAML:
--- title: A title here notebook: notebook name public: true --- The rest of your note content here
You can use as few options as you want to set. All options are optional and can be set in any order. The "public" setting, for example, only needs to be set if you want your note to be public. Otherwise it'll default to false if not listed. Here's a guide to the available options:
title: a string of text and some symbols. Invalid characters or code is stripped out automatically like in the web app. Defaults to "Untitled-[unique almum identifier] if left out or blank. notebook: takes an existing notebook name to save note to. If you use a name that doesn't exist Write.app will try to create it for you. Support for creating new notebooks this way is still unstable but there's no danger of note data being lost. public: Boolean value. Can be either true or false. Anything else defaults to false. True means your note will be publicly visible.
Anything else you add to the YAML front matter that we don't support will be ignored. The YAML itself is even optional so keep that in mind.
One important note about saving notes: Currently we cannot update notes from the plugin. Saving the same note twice will result in a duplicate note. This is something we're aware of and looking for a solution to.
Remember, I'm only one guy working on the entire app, API, plugins and ecosystem plus the plugin is in beta so I can only do so much. But as I always promise and believe I have delivered so far, I always follow through with updates, upgrades, and bug fixes. So rest assured this will only get better with time.
For this plugin I'm about to push an update that'll force all requests to be made over SSL for tighter security and address the issues mentioned here earlier.
Anyway, enjoy the plugin!