Delicious value: 🌟🌟🌟🌟🌟
Taste: Summer black grapes
Taking advantage of the new computer configuration environment at hand, by the way sorted out a wave of iTerm2 + OH-my-ZSH configuration notes, share to everyone.
If you have a productive terminal, here are three keystrokes you need to start your day with when you arrive at work each morning.
Option + enter
, arouse the iTerm2j work
To jump to the working directorycode .
, open the current folder project with VSCode (built-in command line)
So how do you build it? Take 10 minutes and follow these steps.
You may encounter a variety of problems along the way, but I’ve posted as many solutions as I can to help you with the download and configuration.
iTerm2
First click on the link below to download iTerm2.
- Download link
Set the wake up hotkey
To make it easier to invoke the iTerm2 window after the download (as described in step 1 at the beginning of this article), we also need to set hotkeys.
Click iTerm2 => Preferences => Keys => HotKey to find the configuration item HotKey and configure it.
To quickly evoke the terminal and hide, I set Option + Carriage return, option + space left to uTools. UTools is also one of my favorite productivity tools for interested readers.
Common Shortcut keys
-
CTRL + U clears the current line input
-
CTRL + A to quickly switch to the text header of the current input
-
CTRL + E to quickly switch to the end of the currently entered text
-
CMD + D split the screen vertically
-
CMD + Shift + D horizontal split screen
-
CMD + R clear the screen
-
CMD + t opens a new iterm2 Tab
-
CMD + left and right arrow keys left and right switch Tab
-
CMD + n opens a new iterm2 window
-
CMD + Enter full-screen switch
-
CMD + w closes the TAB
-
CMD + F lookup
-
CMD + shift + h to view the clipboard history
oh-my-zsh
- Download link
Some installation on the pit, the solution can refer to the following link:
- ZSH Install step pits
- ZSH network installation error
Configure the topic
First, use the vim ~/.zsh command to open the configuration file and then set your favorite theme. Go to the following two links to see the community recommendations and the official skin preview list.
- Oh my ZSH which themes are more beautiful, have characteristics?
- Skin Preview list
ZSH_THEME="ys"
Copy the code
Finally, run the source ~/. ZSHRC command to re-execute the ZSH configuration file for the configuration to take effect.
Configure the plug-in
In order to implement the operation at the beginning of this article, we still need to download some plug-ins, here also recommended some frequently used plug-ins, please visit the official website for more plug-ins.
The git plug-in
- website
The Git plugin provides a number of Aliases to simplify your Git commands, which can be queried in the link above.
Autojump plug-in
Use j + directory abbreviation, can be flexible in any directory jump, finally can not use CD!
(Implement step 2 at the beginning of this article.)
# Open the vue3 folder
j vue3
/user/tong/work/li
j w li
Copy the code
zsh-syntax-highlighting
- website
The syntax is highlighted and an example before and after installation is shown in the link on the official website.
Run 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
Copy the code
vim ~/.zshrc Enter the command to configure in ZSHRC[Right] [Right] [Right] [Right] [Right]Copy the code
Save the configuration and run the following command to make the configuration take effect.
source ~/.zshrc
Copy the code
zsh-autosuggestions
According to the history of the command, for instant prompt, invincible easy to use.
- website
Run the following command to install.
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Copy the code
vim ~/.zshrc Enter the command to configure in ZSHRCPlugins =(other plugins zsh-autosuggestions)Copy the code
Save the configuration and run the following command to make the configuration take effect.
source ~/.zshrc
Copy the code
If you have made it all the way here, congratulations, you can try the three steps at the beginning of this article, together with the common shortcut keys, I believe your terminal has been very happy to use! Go and try it
Improve the efficiency of the article series recommended:
- “Free hands” old uncle teach you VS Code Disco
- Arm your Browser with a selection of 10 Google Chrome add-ons
- “Improve Efficiency” featured MAC app recommendations to double your brick lifting efficiency
- Select high frequency VS Code plug-in, let you spend more time with Npy!
❤️ love triple strike
1. If you think the food and wine in the canteen are palatable, you can click “like” to support it. Your “like” is my biggest motivation.
2. Pay attention to the front canteen of the public account and eat every meal!
3. Like, comment, retweet === urge more!