Just like any other developer, I have a certain setup for my development tools. I like for applications to run in certain spaces on my Mac, with certain dimensions and very exact configuration options (I am still mad at Apple for removing the ability to have a tile grid of spaces).
When it came to my code editor of choice, for a number of years I was a TextMate user. Unfortunately TextMate has all but died. Yes, I know there is TextMate 2, and it is open source. Plainly, it has not lived up to my expectations. So as much as I hated I did not want to, I made the decision it was time to find a new editor.
I tried a number of different options including: TextMate 2, Sublime Text 2, Chocolat, MacVIM, Coda, and PyCharm. After a lot of trial and error it really came down to two options Vim or Sublime Text 2. Why? Both keep editing simple, have good command line options, great plugins and a huge community.
Sublime fit my style of development a bit better. I liked the simplicity of the key commands coupled with the integration to the console and the incredibly easy package management (using Janus with Vim definitely makes Vim easier, but Sublime still took the cake). I was able to use my old textmate snippets and color schemes, while having a great variety of additional options from the plugin community. It feels almost like they took the best elements of textmate and vim and created something even better. In fact the biggest feature that all other non-Vim text editors missed and that I LOVE about Vim, multi-pane windows, I could do with Sublime. This made the decision, Sublime was my new text editor.
My Sublime Setup
When I first started using Sublime I had no idea how to configure it beyond basic text editing. The key to really unlocking the power of Sublime is to install the Package Manger. Installing package manager is quite simple, on your keyboard hit CTRL + ` to open the console (the tic above the tab key with the tilda). Then paste the following code into the console that appears:
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')
Now you have the Package manger available and can open it by simply using COMMAND + SHIFT + P and typing “Install Package”. Once opened you can scroll through the MANY packages available. Here are the packages I most commonly use and what they provide:
- Djaneiro – This provides a number of great snippets for common template, model and view commands and syntax highlighting for Django apps.
- Angular JS – I have started using AngularJS for many of my front-end projects. This plugin coupled with Batarang for Chrome makes angular development a lot easier. It provides auto-completion of core AngularJS directives, such as ng-repeat, ng-click, as well as any custom directives you create.
- Markdown Preview – Preview your markdown files quickly in you web browser from sublime text.
- Sidebar Enhancements – Makes significant improvements to managing files and folders from the sidebar.
- Sublime Linter – This little plugin helps to make sure I follow Pep 8 while also ensuring I follow proper styles for JS and HTML files.
- Sidebar Git – I use git, we all use git, this makes managing and using git a little easier from the sidebar.
I am sure as I continue to use Sublime I will add more plugins that make life easier and improve my overall editing experience. The great thing about the package manager is that you can browser the plugins, install a plugin, customize the plugin through a config file (just like vim) and easily delete it if it does not work for you. It really makes it easy to explore and see how I can better improve my development workflow.
At the end of the day, I may have chosen Sublime, but I also am not a fanatic. I believe strongly that you should use whatever improves your workflow the most and fits your development style.