Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Start Sublime Text 2 With Git Plugin
#nowarn "62"
//Note this is running on Win7 x64 but git is 32 bit.
let pathEnvVar = "Path"
let gitBin = @"\Program Files (x86)\Git\bin"
let st2Bin = @"\Program Files\Sublime Text 2"
let currentPath = System.Environment.GetEnvironmentVariable(pathEnvVar)
let modifiedPath = gitBin ^ ";" ^ st2Bin ^ ";" ^ currentPath
System.Environment.SetEnvironmentVariable (pathEnvVar,modifiedPath)
System.Diagnostics.Process.Start(st2Bin ^ @"\sublime_text.exe") |> ignore

This comment has been minimized.

Copy link
Owner Author

@OnorioCatenacci OnorioCatenacci commented Jul 18, 2012

This is a small F# shell script (.fsx) to kick off Sublime Text 2 with the Windows github binaries in the path so you don't have to keep git in your path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment