Terminal Setup

test saving


[00:00] In this video, I'm going to show you how to take your boring default terminal on macOS with no syntax highlighting, no colors, and a crappy font, and turn it into this. An amazing terminal with a helpful configurable status bar that displays a lot of helpful information, syntax highlighting when typing out commands, and an amazing looking ls command. Also an amazing font and more! Stick around and make sure to like and subscribe and I'll show you how it's done. Now I have been a developer for over 10 years, and I can say that for most of that time I didn't really care too much about how my terminal looked.

[00:33] As long as it did its job and stayed out of my way, I was happy. But after discovering just a few tools and programs, I can confidently say this is the best terminal experience I've ever had. So now let me show you how to go from zero to hero in just a few quick minutes. The first thing you're going to want to do is throw out that drab old terminal and get something more modern and sexy. Trust me, you'll thank me later.

[00:54] Go ahead and download iTerm2 and as soon as you click that download button just listen to everyone around you gasp. They know something's up. Or more likely than not, you're home alone and nobody is anywhere near you. Either way, I'm excited for you. Now after you've installed iTerm2, you're going to want to make sure your default terminal shell is zsh.

[01:12] You can double check this by typing echo $0, which will spit out your current terminal shell. If it is not ZSH and you don't have it installed you can do so using homebrew. Then you will want to use the change shell command to make sure you're using ZSH after it's installed. Before we go any further, we're gonna want to install a color scheme for our terminal. Now I forgot to shoot this part until after I edited the video.

[01:34] So the whole entire video I'm using this color scheme anyways but I'm gonna show you how to install it here. Basically we go to iterm2colorschemes.com and I like Groovebox dark so I search for that I find it. And then what you're going to want to do is copy the content of this file and create a new file called Groovebox.itermcolors. Next you want to open your settings for iTerm2, go to colors, and click on import. Then you want to import the new file you just created.

[02:02] And voila, you have Groovebox Dark on your iTerm. Now back to the video in regular time. The next thing we're gonna wanna do is install OhMyZSH. OhMyZSH is an open source community driven framework for managing your ZSH configuration. It comes with a ton of amazing themes and amazing plugins that you can install ad hoc.

[02:23] And after looking at their documentation, I did not realize how hilarious it is. Give it a read sometime. To install OhMyZSH, You're going to want to run one of a few commands I'm gonna use the one with curl because I have curl installed if not install curl or W get or fetch Essentially what this does is it will install oh my zsh through the install.sh Script which you can always check out if you want on their GitHub page, just to make sure it's not removing every single file on your machine. Now to install all my ZSH, simply copy and paste that curl command, clones into all my ZSH and you're done. Wow.

[02:58] That's pretty quick. Anyways, now you have all my ZSH installed. You can check out the ZSH RC file that it creates for you and you can see that we have a ZSH theme variable that if you change it, it will change your theme and you have a plugins variable where you can set what plugins you want to run in Oh My ZSH. Now before we go any further, we're going to have to install a special kind of font, a font that has a lot of icons in it, because a lot of the tools we're going to use involve icons. In order to get these cool fonts we're going to have to go to nerdfonts.com.

[03:28] NerdFonts patches developer targeted fonts with a high number of icons. So essentially it adds icons to fonts that you already know and love. My personal favorite is Hack. Essentially you want to go to the download page, download the font you want, and then open up that file and click install font. It's pretty simple on Mac OS.

[03:46] Once that is installed you want to make sure you go to your preferences for iTerm2 and use the font that you just installed. Now you're gonna have the icons that you need moving forward. The next program we're gonna want to install is Power Level 10K. Power level 10k is a theme for ZSH that essentially gives you a nice status line for your terminal. It's extremely customizable So read through the docs and see what you like to install power level 10k We just want to clone the repo and then change the theme variable in our ZSHRC to be powerlevel10k slash powerlevel10k.

[04:21] If we quit out of the file and then source ZSHRC, we are presented with a configuration wizard. This is all pretty straightforward, so just choose the options you like the best and you'll see what you come out with. You can see that I come out with a really cool looking status line pretty easily. Awesome. Next, we're going to give our terminal a little kick with a couple of plugins for OMI.zsh.

[04:44] The first one we're going to install is zsh-syntax-highlighting, and it gives you essentially what it says syntax highlighting for your zsh commands. To install it you're gonna call this git clone line from the install markdown file and essentially what this does is it clones the repository to a special directory that Oh my ZSH knows to look out for. So later you can just add it to the plugins variable in your ZSH RC file. Next we want to install ZSH auto suggestions. This is a really cool plugin that gives you suggestions based on your previous things you were typing in your command line.

[05:16] The installation process is essentially the same. Copy and paste a one-liner. And then we go into our ZSH RC file and add to the plugins variable, our two new plugins, ZSH syntax highlighting and ZSH auto suggestions. Next we want to quit Vim and source our ZSHRC file, and there you have it. We have syntax highlighting and auto suggestions, really awesome stuff.

[05:39] Now, for a little bit of extra credit, we want to give ourselves a cool looking LS command, and that comes with a really cool Ruby gem called color-ls. Now, Mac OS has Ruby installed by default, so you could just write sudo gem install color LS and it will install it for you. Now, if you type color LS, you will see a really cool LS command. It has icons, it's syntax highlighted, it's really really neat. But I don't want to type color LS every time I want to list the files in a directory so let's create a new alias in our ZSH RC file.

[06:12] So we open it up, scroll down to the bottom, and add a new alias setting LS equals color LS. So now every time we type LS, it'll actually run color LS. And that is it. That is how you level up your Mac OS terminal. We now have syntax highlighting, auto suggestions, oh my ZSH, a cool status bar.

[06:31] And when we list our files, we get icons and syntax highlighting. Overall, this is really awesome, and I feel like I'm excited to open up my terminal from now on. Now of course, with every good terminal configuration deserves a good Vim configuration, So if you're interested in learning about the NeoVim configuration you saw here, check out this video next. And as always, have a great day.