Skip to content

Instantly share code, notes, and snippets.

@OnorioCatenacci
Created February 29, 2012 16:18
Show Gist options
  • Save OnorioCatenacci/1942103 to your computer and use it in GitHub Desktop.
Save OnorioCatenacci/1942103 to your computer and use it in GitHub Desktop.
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
System.Environment.SetEnvironmentVariable(pathEnvVar,currentPath);;
@OnorioCatenacci
Copy link
Author

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