12.20.06
Subversion and TextMate
Lately there have been lots of questions about checking things out from TextMate’s Bundle repository, since in Allan’s absence the updates to the bundles won’t reach an official release for another two months. So here is a small guide on what to do.
WARNING: This will require you to type things in the terminal (Terminal.app). I am not responsible for any physical or mental damage to you or persons near you that might arise by following these instructions. But I can fairly safely say that it will not damage your computer.
First of all, read http://macromates.com/textmate/manual/bundles#getting_more_bundles for setting up subversion if you don’t have it installed yet. If you don’t feel like reading, this is what you have to do:
- Go to http://homepage.mac.com/martinott/ and/or http://metissian.com/projects/macosx/subversion/ and download the appropriate file. Then install it in the normal manner, probably double-clicking the download file or something like that. You will likely be required to enter your password.
- To check that this is done, start a new Terminal window, and type “svn” followed by return. If you get a message like: “Type ’svn help’ for usage.” then we’re in business. Otherwise, try to log out and log in again. If it still doesn’t work, then go to the ##textmate IRC channel or email the list for more assistance.
Now that you have subversion installed, there’s one more thing you need to do, and that is to add a line to your .bash_profile file. If you use another shell, then you probably know enough to figure things out on your own. If you do use bash (or if you don’t know what you are using, which amounts to the same thing), then type in the terminal:
mate ~/.bash_profile
If a file in TextMate opens, then we’re good. Otherwise, you need to first install the mate tool from within TextMate (Help -> Terminal Usage… ). Start a new Terminal window after you do that.
Ok, now you’ve got a file open in TM, which may or may not have anything in it. Add the following line somewhere there:
export LC_CTYPE=en_US.UTF-8
Save and close the window. Then open a NEW Terminal window and type:
echo $LC_CTYPE
If you see en_US.UTF-8 as a responce, you can rejoice and take a short break. We are ready for the serious stuff!
Next we need to create the directory where these things will go:
mkdir /Library/Application\ Support/TextMate
cd /Library/Application\ Support/TextMate
ls
Now, depending on whether you have checked things via subversion before, you may see a number of directories here. The ones we care about are Support, Plugins and Bundles.
If you don’t have a Bundles directory and will want to update some bundles, then create this directory now:
mkdir Bundles
Now, on to check out some items from the repository. First the Support folder (provided you don’t have it there):
svn co http://macromates.com/svn/Bundles/trunk/Support
If you don’t have the PlugIns directory as well, then you also need:
svn co http://macromates.com/svn/Bundles/trunk/PlugIns
The username and password, if you are asked, are anon.
If you want to get a bundle as well, then have a look at section 5.7.3 of the manual. Basically you will need a command like this:
cd Bundles
svn co http://macromates.com/svn/Bundles/trunk/Bundles/Haskell.tmbundle
Now for the moment you’ve all been waiting for, updating all these things! You just need this one line (after a “cd ..” if you did the cd Bundles thing):
svn up Support PlugIns Bundles/*.tmbundle
If you’ve encountered an error in any of these, then consult our friendly staff in the IRC channel or the mailing list. Enjoy!
Later
Dr. Drang said,
December 20, 2006 at 8:50 pm
Nicely done. I’m bookmarking this, as I think it’s a better writeup than Allan’s official documentation.
One nit to pick: in the third paragraph, the underscores in the MacroMates URL have been interpreted as a directive to italicize “more.” If you’re using Markdown, you need to either
If you’re using Textile, I’m sure there’s something similar. I’ve made this mistake in Markdown more times than I can count.
Checking out Textmates Bundle Repository said,
December 21, 2006 at 12:47 am
[…] Haris Skiadas has writen a nice explanation of how to update to the newest Bundles from the Textmate Subversion Repository. […]
Haris said,
December 21, 2006 at 1:55 am
Thanks Dr. Drang! I wonder how I missed them, I usually make links into such.
Adam said,
December 26, 2006 at 1:44 pm
Great post
Joanna said,
January 10, 2007 at 4:00 pm
I’ve been wondering how to do this for ages - thanks so much!
Subversion and TextMate at Excursus said,
May 11, 2007 at 3:09 pm
[…] In Prefences → Software Update you can set TextMate to automatically check for updates (recommended). You can also set it to watch for cutting edge updates. Cutting edge updates add advanced functionality and some bundles require this setting. In a way, the label is misleading, since the cutting edge updates tend to be very stable. If, however, you want the bleeding edge of TextMate development, you will have to access TextMate’s subversion repository, http://macromates.com/svn/Bundles/trunk/. There you will find bundles, plugins, support files, themes, tools, and more. Instructions about how to checkout bundles from the subversion repository can be found in the manual (RTFM, baby), and the wiki. These should definitely be read. But above all check out Haris Skiadas‘ excellent tutorial. […]
links for 2007-05-21 » Graham English Social Networking said,
May 20, 2007 at 10:29 pm
[…] After thought » Subversion and TextMate Lately there have been lots of questions about checking things out from TextMate’s Bundle repository, since in Allan’s absence the updates to the bundles won’t reach an official release for another two months. So here is a small guide on what to do. (tags: bundle plugins TextMate tutorials Subversion) […]
Nate said,
August 3, 2007 at 9:47 am
Hi Haris,
When I have tried to do an update of my bundles (so as to get the latest version of your excellent Latex bundle), the PlugIns and Support update works fine, but then I get this message:
svn: REPORT request failed on ‘/svn/Bundles/!svn/vcc/default’
svn: Target path does not exist
What should I do?
Subversion and TextMate Post « no chicken said,
August 12, 2007 at 11:59 pm
[…] Haris Skiadas has written a great post about keeping your TextMate Bundles up to date with subversion. […]
Marco Polo said,
August 18, 2007 at 11:08 am
Thanks, very well written.
But I messed with the Bundle Editor and deleted the “Typeset & View (PDF)” Command and this svn update doesn’t give me back my command.
What can I do?
Can you post the contents of yours, I would appreciate it greatly, since it is nowhere to be found in the www,
thanks for your efforts with TM/teX,
Truly,
MaP
Haris said,
August 22, 2007 at 9:46 pm
@Map,
In general, you should send questions about bundles to the TextMate mailing list. You should find the bundle under ~/Library/Application Support/TextMate/…
That’s where the change you have made is likely (I am assuming you checked out the svn bundle under /Library/Application Support/…
If you have no other local modifications that you care about, you can remove the entire copy of the bundle that is under ~/…
Marco Polo said,
August 28, 2007 at 5:30 am
Thanks, Haris.
I did erase my local modifications, and erased the latex bundle. Anyway, somehow TextMate reinstalled it after a couple restarts (don’t know exactly how it all happened but I got it back).
Now I can use the Preferences that appear in the Typeset & View window to not display the PDF after building it, since I am using the Latex Watch (and the GetBundle) bundle to view it, and the workflow is quite nice.
I think you should update your screencasts about Latex/TextMate to point out this great Watch bundle: to rebuild the PDF (opened in Skim already) every time you save your changes in the .tex file or TextMate looses focus (if you say in TM Preferences to save file after lost focus).
Also looking at the R and SWeave Bundles. Nice effort!
Wolf said,
September 14, 2007 at 5:20 am
Thanks, solved an svn problem we had
Wolf’s Little Store » Textmate goodness said,
September 16, 2007 at 12:52 am
[…] How to set up Textmate to work with SVN. Easy, yet not so obvious. […]
George Tziralis said,
October 10, 2007 at 7:57 am
Hi Haris, i wonder if you could contribute a non-geeky guide of installing latex watch on textmate, would be very useful and i haven’t found anywhere anything relevant yet. thanx!