In there I saw Sublime2 and since I have never heard of it I went to check it out. After reading the feature list and looking at some screenshots I just knew I have to give it a test drive. After download and install I opened up one of my django models.py file. Immediately recognized the syntax and presented me with a very nice syntax highlighting. To my biggest surprise even auto complete worked. After reading up some of the docs and a couple of blog posts I learned that I can do pretty much anything without my hand ever have to leave the keyboard. I am a longtime vim user (although vim was not my choice of texteditor in day to day programming), and it felt good being able to open files, jump to any function/method and even install new packages without using the mouse. At this point I closed my eclipse and I knew it was not a temporary move. I had tried many texteditors/ides over the years but I always ended up going back to eclipse. Eclipse is a very convenient ide with all the language support I needed, but it is also a resource hug and many times it overkill what I am using it for. Sublime2 is a great compromise with it's functionality and simplicity.
Below packages in my opinion needs to be installed after a fresh new sublime install.
- Sublime Package Control
- Soda Theme
- Bracket Highlighter
- Prefixr Plugin
- Sublime Linter
- Sublime CodeIntel
- Open up Sublime and press Ctrl+` that will open up the console
- Paste this into the console:
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'
- Press enter. It will install the Package Control for Sublime.
- Now restart Sublime and you are ready
To enable the Soda Theme open preferences and user settings. Add this into it
Here are some of the commands I learned and learned to love spending less than a day with Sublime2. I will keep this list update as I learn more of them.
- Cmd+Shift+P => Brings up the Command window, you can access pretty much everything here.
- Cmd+P => Open anything window. My FAVORITE feature, you can just start typing and it will display all the files that insudes the typed in text, then press enter and open it. Seriously this saves a ton of time when you know what file you want to open and it is burried many level deep in directories.
- Cmd+R => Find any function/method/class window. This is an other huge time saver. Once you typed in text it will display all possible choices, Use the arrow key to scroll through it and it also moves the cursor immediately at the location. Got to love it!
- Type lorem then press Tab => Inserts a full paragraph of lorem ispum text. I am pretty sure everyone uses it to fill up empty space to represent content.
I am going to write up an other post on basic configuration and how to create Projects with Sublime2 and switch between them using your keyboard only.