Terminal is one of the apps that I use most throughout the day. So, I spent time to configure it how it would best fit my workflow. This is the first window I see when I open my terminal:
And when I’m working on a project:
Coming from Hyper.js, I recently made the switch to iTerm and couldn’t be happier. iTerm’s configurability makes it a really easy to fine-tune your workflow, and offers a lot more robust functionality than Hyper.
I use the theme Dracula, which is a colorful but not overwhelming theme. It makes it easy for me to differentiate some of the different things I’m reading when using it, and its wide availability for many different applications keep a consistant look for my computer.
Because of my shell prompt, the font must support programming ligatures, which are typically referred to as “powerline” fonts. I typically switch between SF Mono Powerline and Fira Code. Both of them are clean and easy to read, which is pretty much all I look for in a font.
iTerm has this really neat feature called the status bar. Its a floating information bar above your terminal which keeps always displays some information. Its unobtrusive, and the color scheme makes the terminal even more beautiful.
Natural Text Editing
Out of the box, iTerm can be a little more restrictive in how you’re able to interact with text in the prompt. However, a quick change in the profile section of the settings allows you to interact with the command prompt as naturally as you would with any other application on your computer, using your standard jump-to short cuts. All you have to do is enable the natural text editing preset.
This is my favorite shell to use, and I pair it with the Oh My Zsh framework to manage zsh. One of my favorite things about Oh My Zsh is the shortcuts for the commands I run everyday. For example, instead of
git commit -m you can run
gcmsg. There’s a full list of these shorcuts in this cheatsheet. I greatly appreciate these shortcuts, espeically considering that I use them hundreds of times a day, which saves me a lot of typing.
My Zsh prompt of choice is Spaceship, which I find to be a lot cleaner and nicer to use than the popular Agnoster theme. Agnoster uses large blocks of color on the screen, which looks less refined than the text-based prompt that Spaceship uses.
One of the first plugins I installed was zsh-syntax-highlighting, which adds syntax highlighting while typing out your command. This way, its quick to tell if a certain command is available.
zsh-autosuggestions is a plugin which will use previously used commands to predict the next command. Of course, this is non-intrusive, and you have to press the right arrow if you want to fill in what was predicted. Its a nice plugin to have when you’re repeating a lot of the same commands over again to test something and you don’t want to type out the entire thing.
I use the ‘->’ key to fill the autocomplete without execution, and
Space for fill and execution. You can change the setting using
bindkey in terminal, like so:
bindkey '^ ' autosuggest-execute
One of the most useful things that I use in my terminal is the ability to alias commands, so that I can type much shorter commands. For example, for any of my classes, I alias
440 (for CS440) to go directly into that directory. That way, no matter where I am, I will go straight to that terminal.
Another thing that I use a lot is
open . to open in Finder, and
code . to open in VSCode. These are small things that make my development process a lot faster when switching between projects.