Sublime Text and Mercurial

I’m perpetually on the lookout for a good text editor that is feature-rich enough to use for Python development. I am still stuck with NetBeans, because I like it enough. But it’s not sustainable. They seem to pathologically hate Python.

Sublime Text was recommended to me, and I’ve given it a try. It’s very pretty, very fast and easy to use. It has Mercurial integration via Packages, for example the “SublimeHg” package.

Unfortunately, my installation of Sublime Text could not see my install of Mercurial (under Mavericks, OS 10.9). Neither a Fink-aided install, nor a package direct from the Mercurial site. In NetBeans, I simply set a path. In Sublime Text, there are fewer options.

I had tried adding a new name for the mercurial executable “/sw/bin/hg” or “/usr/local/bin/hg” with the following variable in the file preferences.sublime-settings

{
  "packages.mercurial.hg_exe": "/usr/local/bin/hg"
}

The answer (after two days of trying) is that you need to install another package (Fix Mac Path) so that Sublime can find the Mercurial installation. Fix Mac Path just brings your PATH variable to the party. The “Package Control” feature of Sublime Text has search, but you need to know that the package in question has the name SublimeFixMacPath. Searching for Fix Mac Path is hopeless! I tried so many ways, including adding the github page as a “Channel”. But in the end, the right PATH (set by .profile) and the presence of “sublimefixmacpath” was enough that Sublime Text could launch Mercurial…

I persevered because the community and effort around Sublime Text, and the positive acclaim, makes it look like a good bet for the long term. Let’s see if I’m right.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s