Skip to content

Instantly share code, notes, and snippets.

@abhishekkhaware
Last active December 26, 2015 12:39
Show Gist options
  • Save abhishekkhaware/7152497 to your computer and use it in GitHub Desktop.
Save abhishekkhaware/7152497 to your computer and use it in GitHub Desktop.
Create an shortcut or Alias ( like, OSX or linux -> subl ) for Sublime Text 2 or 3 in Windows PowerShell.
# Open Powershell profile
## PS c:\> notepad $profile
# Add Path($PATH= C:\Program Files\Sublime Text 2\) to the System Envairoment Variable for easy access of Sublime_Text.exe
# Create a function for Sublime Text 2 or 3 in $profile
function sublime($arg1){ sublime_text.exe $arg1 }
# Now Create An Alias:
Set-Alias subl sublime
# Save The $profile file.
# Restart PowerShell And Try it:
## PS c:\> subl
# OR,
## PS c:\> subl $profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment