Stubblog


E-TextEditor & Team Foundation Server
October 7, 2008, 9:09 am
Filed under: development | Tags: , , ,

E-TextEditor is a great code editor for Windows, implementing much of the functionality of Textmate on the Mac, it is also compatable with Textmate’s bundles too.

As well as letting you create bundles in all the languages Textmate provides (Python, Ruby, shell scripts) E also provides “Windows Native” bundles, making it easier to run native windows apps from your bundles.

It’s not very well documented however, and I wanted to be able to check out a file from TFS directly, without having to swap into Visual Studio to do it. Below is the very simple bundle command I came up with to do that.

@for /f %%P in ('c:\cygwin\bin\cygpath.exe -w %TM_FILEPATH%') do @set FILEPATH=%%P

@"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe" edit %FILEPATH%

Looks fairly simple, but there are a couple of things to note:

Firstly you have to use DOS shell variable syntax for $TM_FILEPATH, change it to %TM_FILEPATH%. This variable is also presented as a cygwin path, which needs converting to a windows path. The first line in the command takes the output from Cygwin’s “cygpath” and assigns it to the FILEPATH variable. Note the doesble %% on the intermidiate variable as well. You normally just use a single % when running from the command line, but in this instance you need 2.

That’s all there is to it, I’d love to see what others have come up with to integrate TFS into E, post a comment and let me know …

Advertisements

Leave a Comment so far
Leave a comment



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



%d bloggers like this: