Freshening up Sublime Text - part three: Finding new packages
This is the third post in a series where I am cleaning up and improving my Sublime Text environment. In the first part I found a new theme and in the second part I updated with some of my old favourite packages.
Sublime text is great! If you look at my blog you quickly see that I really, really like it. It seem to be all that I write about recently. As a text editor, Sublime Text is outstanding by itself, but the killer feature is the ability to extend the functionality through plugin packages. This is greatly supported by Package Control and the wast community of package creators. But to quote Kevin Smith’s SModcast commercials: “There is so many to choose from”. Luckily there are a few good ways to find packages and keep up with what is happening.
The first choice is obviously the Package Control web site. Version 2.0 was released last summer with a revamped version of the web site which added some great new discoverability features. In addition to the all-important search feature, it provides lists of popular, new and trending packages which makes it easier to browse and discover packages. Package Control also has a twitter feed at @SublimePackages with a curated list of the latest published packages. There is also the twitter feed @SublimeTxtTips which provides and relays tips and tricks for Sublime Text.
I have been following the above twitter feeds for the last half year and have noted quite a few packages that I want to try out and which may enhance my development and writing work flow. In this post I will write about my first impressions as a review of some of these packages.
Since I am exclusively using Sublime Text 3 now, many of these packages are for ST3 only.
Edit Preferences
Edit Preferences is a plugin that can list keyboard shortcuts, preferences, commands and more from both Sublime Text and the installed packages. This is listed in the QuickPanel with the possibility to jump to the edit location. When I first saw this plugin I was very eager to try this out. There are a lot of preferences and keyboard shortcuts in Sublime Text and having the possibility to quickly search through them is a highly desired functionality. There are a couple of animations on the plugin page demonstrating the features that makes this look very cool.
However, when I installed it the look and behaviour is somewhat different than shown in the animation. The original demo looks like this: In my Sublime Text the keyboard shortcut list looks like this I don’t know why this is so different. Maybe something has changed in later versions of ST3. The package hasn’t been updated in 11 months and there have been several updates to ST3 since.
This, together with the documentation being a bit sketchy, makes the impression of the package less impressive that it first looked. Still, the possibility of quickly searching through the preferences and shortcuts are nice to have. If all you want is a good way to search for keyboard shortcuts you are better off with the Keymap plugin described below.
Here is a tip if you decide to use this package: The package comes with some keyboard shortcut definitions, but they are not enabled by default. To enable them, open the file Default.sublime-keymap.template and copy the shortcuts to your User keymap.
MarkdownEditing
I spend a lot of time writing markdown. All posts for this blog are written in markdown thanks to the excellent framework from Octopress. It is therefore great to get some assistance from Sublime Text when writing and there are many packages that extends Sublime Text’s handling of markdown. MarkdownEditing is one of the more feature rich packages. Have a look here for a list of the features it provides.
It is said that it is important to make a good first impression, but for MarkdownEditing the power comes after using it for some time. When I first installed it I was initially put off of how intrusive it was by changing so many of the default styles when editing markdown. For example, it changes your default font, tab settings and cursor. It also moves the text to the centre of the window with a fixed with and with word wrap enabled. You are also forced to use one of the included colour schemes to get full use of the syntax highlighting. After using the package for some time now I feel that the changes the plugin makes is actually well thought out and helps focusing the writing on the text, especially combined with Sublime Texts distraction free mode.
The MarkdownEditing package is very good and I especially like the following features:
- List handling which auto insert new list item bullets and manages the indent/unindent list level with
Tab
/Shift+Tab
- Markdown headers are Project Symbols so you can jump to them using
Ctrl+Shift+R
- Smart key bindings including simplification of link specification
- Good documentation
- Separate settings file for each markdown flavour so that you can change any of the default settings if you prefer.
There is always room for improvements, though. Here is a couple of things I have noticed: The interpretation of GFM fenced code blocks is too rigid so that the inline syntax highlighting of code doesn’t work well with the way Octopress’ use them. It doesn’t allow for a space between the ticks and the language specification. Also, if there are any trailing text on the same line as the language specification the highlighing doesn’t work. Another gotcha is that the package disables and replaces the native Sublime Text Markdown package. I had an old Markdown.sublime-settings in my User folder as I had previously bound the Markdown language to a custom file extension. After installing this package starting Sublime Text gave me an error message every time until I manually deleted my old Markdown.sublime-settings file.
Sublime Text API Helper
A plugin that shows the Sublime Text API reference in a quick panel. It is pretty simple, but very useful when creating Sublime Text plugins. Just a quick Ctrl+Alt+P
to list API classes and when a class is selected all class methods are shown with a short description.
Since it is a quick panel it is easy to search in the methods, and when a method is selected the method template is inserted at the text cursor position.
Keymaps
The Sublime Text Keymap Helper makes it easy to discover keyboard shortcuts for functions. With its “Find keymap for…” function it lists all commands with a shortcut in a quick panel for easy searching. The selected command can be executed by hitting enter. This plugin solves much of the same problem as the EditPrefrences plugin and does it in a much better way. The discover keyboard shortcut function was my main reason for keeping EditPrefences around, but with the Keymap plugin available I can remove EditPreferences from my collection.
The “Find keymap for…” function alone would be enough to make this plugin worth having, but it offers another feature that should make this plugin an essential part of your collection. It can create a cheat sheet of all keymap bindings that is searchable and colour coded. The cheat sheet is created in a separate Sublime Text tab and is nicely formatted and sorted for each plugin you have, and have the possibility to jump to the selected keymap file to edit it.
LastModifiedIndicator
Last Modified Indicator is a little package that adds a visual indication of the last line that you changed. It has two ways of showing the modified line which can be switched by a simple setting. It does no more nor less than just showing the last modified line, but it can be quite useful when programming to find where you last made a change to the code. It is a feature that Sublime Text really should have built in. One obvious extension to this package that would make it even more useful is if it could mark all changed lines since last save.
EasySettings
This package provides auto-completion of settings in a settings file which is very useful as Sublime Text has A LOT of settings. The plugin is also supposed to show the documentation when a setting is selected, but I could not get that to work.
Theme editor
This is not a plugin, but an HTML5 web app for visual editing of a Sublime Text theme. I haven’t tried it much, but it seems pretty slick and is much much easier than editing a plist file.
By the end of this my package collection now consist of the following:
- AAAPackageDev
- Alignment
- EasySettings
- GenerateUUID
- Indent XML
- Keymaps
- MarkdownEditing
- NSIS
- OLGA
- Package Control
- PlainTasks
- Sublime Text API Helper
- Theme - Flatland
- TOML
- WordCount
Next: Setting Sublime Text up as the perfect Python development environment.