- Open your Terminal.
- Run
cd(to go your root. Your root is the folder that contains Library, Movies, Music, etc.) - Run
code . - It didn't work? Don't worry. Just open VSC and go to your root manually.
- You should now be able to find the
.zshrcfile to your left. - Open it.
That's it! You now know how to access your .zshrc file.
- Navigate to your
.zshrcfile. - Do
cmmd + Fand look for "robbyrussell". - Substitute that name for
agnoster - You should have a line like:
ZSH_THEME="agnoster" - Save:
cmmd + s.
- Open your Terminal.
- Do
cmmd+,. Or just go to preferences of iTerm2 - Go to Profiles > Text
- Check the box for Use built-in Powerline glyphs
We tried to install it through VSC earlier. It doesn't always work, so let's check!
- Open your Terminal.
- Run
ls. - Now move into any folder by doing
cd any_folder__you_see. i.e.cd Desktop. - Now run
code ..
VSC should open in the same path you're at now. To the left, you should see an Explorer menu that shows the content of the folder tou entered.
If nothing happened when you ran code . or you're ina different path, do:
This section is only necessary if the command didn't work.
- Navigate to your
.zshrcfile. - Paste this line anywhere:
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin". - Save:
cmmd + S. - Quit VSC and iTerm2
- Repeat the process to check if the command works.
-
Navigate to your
.zshrcfile. -
Open it and create an alias:
alias hello="echo 'Hello world!'"
-
Save:
cmmd + S. -
Quit VSC and iTerm2.
-
Open iTerm2 and write:
hello.
Your output should be: Hello world! If it is, congrats! You just created your first alias.
Your iTerm2 is all set 🤩
- Wherever you are in your terminal, you will be able to open VSC from the command line in that same path by running
code .Trust me, you'll be thankful in the future. - You now know how to create aliases. This will come in handy for highly used commands.