Skip to main content

Installing Packages for Sublime Text 2 on Linux

I decided to give Sublime Text 2 a try on the next sprint on my current project. I've heard a lot of great things about it and have been impressed in the bit of messing around I've done thus far, and as I've said before although CFEclipse rocks for CFML development after using it for years and years Eclipse is just starting to feel like a lot more than I need. Eclipse is great for the Groovy and Java work that I do but for CFML I've been looking for something more lightweight, because for CFML work I tend to use Eclipse as a pretty basic editor and file navigator. Like most programmers I also tend to get bored and simply want to try new things once in a while.
I used emacs on the last round of updates to the OpenBD admin console. I really, really like emacs but you're stuck with using the HTML syntax highlighting and code formatting since there's no CFML plugin for emacs (that I could find anyway), so it falls over pretty hard if you try to do too much CFSCRIPT. I also use vim quite a lot as an editor but for full-blown project work I've never made the switch for whatever reason. I'm also a big fan of UltraEdit and although they do have a Linux version, it's pretty sluggish. Hopefully that'll get better in newer releases.
But I digress--the real point of this post is a quick tip on where to put Sublime Text packages on Linux. Not a huge thing but I figured I'd share since I did have to do a bit of hunting around. Even though Sublime Text is available for Linux (which is awesome), most of the information around this assumes you're using either Windows or Mac.
After you extract Sublime Text 2 and run it for the first time it creates the directory ~/.config/sublime-text-2 and this is where you put your packages. You just copy the directory containing the package you want to install into ~/.config/sublime-text-2/Packages, restart Sublime Text, and you're done.
Let's use the ColdFusion Plugin as an example. After unzipping the plugin, you'll copy the ColdFusion directory (the entire directory, not just the contents) into ~/.config/sublime-text-2/Packages so you'll wind up with the directory ~/.config/sublime-text-2/Packages/ColdFusion Restart Sublime Text and if you go to View -> Syntax you'll see ColdFusion in the list.
Note that in some of the Mac instructions I found they indicated you have to also add a symlink in ~/.config/sublime-text-2/Installed Packages that points to the directory of the package. I did that first and it works but given that all the other packages in ~/.config/sublime-text-2/Packages show up in the menus, I decided to delete the symlink and after restarting Sublime Text everything still works.
I'll be using Sublime Text 2 hot and heavy over the next few weeks so I'll share my experience with it. If you have any tips for a n00b or stuff that tripped you up when you first started using Sublime Text I'd love to hear them.

Comments

Dominic Watson said…
Check out the package-control plugin. Once installed, you get a proper package manager in Sublime (that is lightening fast). The ColdFusion plugin is listed in its repo too :).

http://wbond.net/sublime_packages/package_control

(and works just dandy in Linux and Windows, presumably in OSX too)
Matt Woodward said…
Thanks Dominic -- just came across that when I installed Sublime Text on another machine recently and it is indeed pretty slick.
a said…
Is there a syntax checker for coldfusion sublime? like a big red red in the gutter when you have missing cfif etc?

Just trying out sublime and it looks very nice a syntax check would make it better
Matt Woodward said…
Not that I know of, but I haven't dug into all the ins and outs of Sublime yet. Been too productive to go beyond the basics I guess. ;-)

That would indeed be a nice addition but as far as I know there isn't one.
a said…
ok thanks. The other sticking point for me which I cant seem to find an answer for is the syntax highlighing of different html elements.

form & inputs orange, divs blue or whatever.

I know it is possible as i have hacked the html language file to identify form elements, but the fact that this was a new install and the html language file did not have any hooks for theming forms etc makes me think its not a html editing tool thats widely used?? I cant see that people dealing with html everyday would have such a flat pallete ie all tags the same colour? maybe i am missing something? but i have looked for screenshots of html in sublime and in every one the html tags are the same colour for every html tag
Matt Woodward said…
Interesting, I'm not sure I've ever used an editor where each *tag* is a different color. Typically (at least in the ones I've used) tags might be a different color than attributes inside tags, but I guess I've never used one where a table tag would be a different color than a select tag, for example.

I haven't dug into this too deeply yet (still on my to do list) but from what I understand the plugin development is pretty straight-forward, and is very similar (might even be identical) to the plugin format of TextMate. So if for example you know TextMate does the syntax highlighting you want you could port that over to Sublime without too much trouble from what I understand.
a said…
thanks Matt, I guess i am old school back to homesite, coldfusion studio then to cfeclipse. Think they all had html highlighting and white backgrounds.

here are a couple of examples of what i mean.

http://www.nebo3.org/images/2.jpg

http://www.solotuweb.org/files/screenshots/homesite.jpg

switching editor is something that takes a while to get used to and "work" gets in the way! I am sure its possible to get it set up, but like everyone don't have the time to get it going.

I think you would need to alter the html language file to get more granular hooks, in that file all the tags are grouped together. Was just abit surprised that it wasn't already like that, which then got me thinking that it isn't the editor of choice for html guys? Would be interesting to see screen shots of different guys cfm, html code, what colour's your form tag? :-)

Sublime looks gorgeous though so might have a look again when i have more time.
a said…
found this, might be little project for get hub to split out the html tags, if i get round to it

http://lists.macromates.com/textmate/2011-January/032082.html

RE: How to change tag coloring?

Popular posts from this blog

Installing and Configuring NextPVR as a Replacement for Windows Media Center

If you follow me on Google+ you'll know I had a recent rant about Windows Media Center, which after running fine for about a year suddenly decided as of January 29 it was done downloading the program guide and by extension was therefore done recording any TV shows.

I'll spare you more ranting and simply say that none of the suggestions I got (which I appreciate!) worked, and rather than spending more time figuring out why, I decided to try something different.

NextPVR is an awesome free (as in beer, not as in freedom unfortunately ...) PVR application for Windows that with a little bit of tweaking handily replaced Windows Media Center. It can even download guide data, which is apparently something WMC no longer feels like doing.

Background I wound up going down this road in a rather circuitous way. My initial goal for the weekend project was to get Raspbmc running on one of my Raspberry Pis. The latest version of XBMC has PVR functionality so I was anxious to try that out as a …

Setting Up Django On a Raspberry Pi

This past weekend I finally got a chance to set up one of my two Raspberry Pis to use as a Django server so I thought I'd share the steps I went through both to save someone else attempting to do this some time as well as get any feedback in case there are different/better ways to do any of this.

I'm running this from my house (URL forthcoming once I get the real Django app finalized and put on the Raspberry Pi) using dyndns.org. I don't cover that aspect of things in this post but I'm happy to write that up as well if people are interested.

General Comments and Assumptions

Using latest Raspbian “wheezy” distro as of 1/19/2013 (http://www.raspberrypi.org/downloads)We’lll be using Nginx (http://nginx.org) as the web server/proxy and Gunicorn (http://gunicorn.org) as the WSGI serverI used http://www.apreche.net/complete-single-server-django-stack-tutorial/ heavily as I was creating this, so many thanks to the author of that tutorial. If you’re looking for more details on …

The Definitive Guide to CouchDB Authentication and Security

With a bold title like that I suppose I should clarify a bit. I finally got frustrated enough with all the disparate and seemingly incomplete information on this topic to want to gather everything I know about this topic into a single place, both so I have it for my own reference but also in the hopes that it will help others.Since CouchDB is just an HTTP resource and can be secured at that level along the same lines as you'd secure any HTTP resource, I should also point out that I will not be covering things like putting a proxy in front of CouchDB, using SSL with CouchDB, or anything along those lines. This post is strictly limited to how authentication and security work within CouchDB itself.CouchDB security is powerful and granular but frankly it's also a bit quirky and counterintuitive. What I'm outlining here is my understanding of all of this after taking several runs at it, reading everything I could find on the Internet (yes, the whole Internet!), and a great deal…