Long story short, i upgraded my work daily from windows 8 to windows 10, one of the main things i badly wanted to set up was launching sublime from git bash terminal. Earlier i used a method that involved creating a file inside of git installation to host the script that launches sublime.
But i was searching around for a way that was easier for me to setup my terminal if i were to upgrade my OS in the future. Finally came across this gem of an idea to actually use aliases. I then ended up creating a bunch of aliases to make my life easier. Since i put them all on the
.bash_profile file i can now have them on a GIST or on a repo and have the aliases between computers.
- Create a
.bash_profilefile if it does not already exist under C:\Users\UserName.
- Paste the function below and restart git bash terminal.
- What it does is it creates an alias for a function call that invokes
sublime_text.exewith an arugument.
- we use the argument to let sublime know which file or folder to open ( like
- And can be used like