Delicious value: 🌟

Flavour: summer black grape

While to hand the new computer configuration environment, incidentally organized a wave of iTerm2 + oh-my-zsh configuration notes, to share with you.

If you have a productive terminal, you can arrive at work each morning with these three key steps to kick off a happy day of pegging.

  1. Option + enter, arouse the iTerm2
  2. j work, jump to the working directory
  3. code ., open the current folder project with VSCode (VSCode comes with command line)

It’s that efficient, so how do you build it? Take 10 minutes and follow these steps.

You may encounter a variety of problems along the way, and I’ve done my best to post solutions to help you download and configure them.

iTerm2

First, click the link in the description to download Iterm2.

  • Download link from official website

Set up the wake hotkey

After downloading, we also need to set up the hotkeys in order to evoke the Iterm2 window more easily (implementing step 1 at the beginning of this article).

Iterm2 => Preferences => Keys => Hotkey

I can quickly invoke terminal and hide, so I set option + enter, option + space for uTools. UTools is also one of my favorite productivity tools for interested readers to learn about.

Common Shortcuts

  • ctrl + uClear the current line of input
  • ctrl + aQuickly switches to the header of the currently entered text
  • ctrl + eQuickly switches to the end of the text currently entered
  • cmd + dVertical split screen
  • cmd + shift + dHorizontal split screen
  • cmd + rClear the screen
  • cmd + tOpen a new iterm2 Tab
  • Cmd + left and right arrow keysTab left and right
  • cmd + nOpen a new iterm2 window
  • CMD + enterFull screen switch
  • cmd + wA closing tag
  • cmd + fTo find the
  • cmd + shift + hView Clipboard history

oh-my-zsh

  • Download link from official website

For some of the pits on the installation, please refer to the following link for the solution:

  • ZSH install tramp pit
  • Zsh network installation error

Configure the topic

To get started, use the Vim ~/.zsh command to open the configuration file and set your favorite themes. Check out the community recommendations and official skin preview lists in the following two links.

  • Oh my ZSH which theme is more beautiful, has the characteristic?
  • Skin Preview List
ZSH_THEME="ys"

Finally, execute the command source ~/.zshrc to re-execute the ZSH configuration file for the configuration to take effect.

Configure the plug-in

In order to achieve the operation at the beginning of this article, we need to download some plug-ins. Here are some plug-ins that are recommended for frequent use in daily life. For more plug-ins, please visit the website.

The git plug-in

  • website

The Git plugin provides a number of alias to simplify your Git commands, which can be found in the links above.

Autojump plug-in

J + directory abbreviation, you can flexibly jump between any directory, finally can not use CD!

(Implement step 2 at the beginning of this article)

/user/tong/work/li j w li /user/tong/work/li j w li

zsh-syntax-highlighting

  • website

The syntax is highlighted, and there are examples of before and after installation in the link to the website.

Execute the following command to install.

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Vim ~/.zshrc # I have written the plugins=(other plugins zsh-syntax-highlighting)

Save the configuration and run the following command to make the configuration take effect.

source ~/.zshrc

zsh-autosuggestions

According to the command of the history record, immediate prompt, invincible easy to use.

  • website

Execute the following command to install.

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Vim ~/.zshrc # configure plugins=(Other plugins zsh-AutoSuggestions)

Save the configuration and run the following command to make the configuration take effect.

source ~/.zshrc

If you successfully arrived here all the way, then congratulations you can try the three operation steps at the beginning of this article, and then with the commonly used shortcut keys, I believe your terminal has been used up very cool! Go and have a try