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

Running a Django Application on Windows Server 2012 with IIS

This is a first for me since under normal circumstances we run all our Django applications on Linux with Nginx, but we're in the process of developing an application for another department and due to the requirements around this project, we'll be handing the code off to them to deploy. They don't have any experience with Linux or web servers other than IIS, so I recently took up the challenge of figuring out how to run Django applications on Windows Server 2012 with IIS.

Based on the dated or complete lack of information around this I'm assuming it's not something that's very common in the wild, so I thought I'd share what I came up with in case others need to do this.


This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Assumptions and CaveatsThe operating system is Windows Server 2012 R2, 64-bit. If another variant of the operating system is being used, these instructions may not work properly.All of the soft…

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 …

Fixing DPI Scaling Issues in Skype for Business on Windows 10

My setup for my day job these days is a Surface Pro 4 and either an LG 34UC87M-B or a Dell P2715Q monitor, depending on where I'm working. This is a fantastic setup, but some applications have trouble dealing with the high pixel density and don't scale appropriately.
One case in point is Skype for Business. For some reason it scales correctly as I move between the Surface screen and the external monitor when I use the Dell, but on the LG monitor Skype is either massive on the external monitor, or tiny on the Surface screen.
After a big of digging around I came across a solution that worked for me, which is to change a setting in Skype's manifest file (who knew there was one?). On my machine the file is here: C:\Program Files\Microsoft Office\Office16\LYNC.EXE.MANIFEST
And the setting in question is this:
<dpiAware>True/PM</dpiAware>
Which I changed to this: <dpiAware>False/PM</dpiAware>
Note that you'll probably have to edit the file as administr…