Created
February 29, 2012 16:18
-
-
Save OnorioCatenacci/1942103 to your computer and use it in GitHub Desktop.
Start Sublime Text 2 With Git Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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);; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.