zsh!oh-my-zsh! 好看的主題和插件以及個人.zshrc

題外話,因爲clear每次打的很麻煩,能夠直接使用ctrl+L清屏,和clear等效。git

First:github

安裝好zsh和oh-my-zshweb

Second:shell

接下來就能夠開始享受了vim

主題:cloud   這個雲朵看上去挺舒服的~~瀏覽器

另一個主題就是 crunch,也是我目前在用的一個主題ruby

設置方法:vim ~/.zshrc, 找到ZSH_THEME=「」,這句話,在雙引號裏面寫上cloud就能夠啦!bash

若是你在裏面寫的是random,每次開啓終端的主題將是隨機的!session

固然你也能夠本身找主題,oh-my-zsh裏面帶有主題了,主題都在如下這個文件夾裏,能夠進去找本身喜歡的dom

~/.oh-my-zsh/themes

插件:

一、git
二、pip

這兩個沒什麼講的

三、sudo

當咱們輸入命令須要管理員身份時,沒必要讓光標回到開始打一個sudo,能夠直接按兩次ESC,就會自動幫你加上sudo

四、thefuck

當咱們輸入命令錯誤時,輸入fuck,終端就會乖乖的給咱們正確的指令選擇了!(這個插件須要本身下

五、autojump

在終端輸入d,能夠顯示剛剛走過的路徑,而後按數字選擇進入哪個目錄。(這個插件須要本身下

六、web-search

直接在終端使用瀏覽器搜索,能夠百度 谷歌

七、last-working-dir

能夠記錄我退出終端時所在的路徑,再次打開時還在這個路徑

八、zsh-syntax-highlighting

shell下的語法高亮,(這個也要本身下,命令以下

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

除了以上的兩個插件須要本身下載,其餘都不須要的。

設置方法:vim ~/.zshrc 在裏面找到plugins=()

而後在括號里加上想要的插件就能夠了。

plugins=(
    git
    pip
    sudo
    thefuck
    autojump
    web-search
    last-working-dir
    zsh-syntax-highlighting
)

以上步驟操做完後,重啓終端,輸入source .zshrc,就ok了!

注意每次添加插件之後,都要進行source .zshrc一下,讓這些插件運行起來。

另外,個人截圖軟件的scrot,查看圖片是用gwenview

scrot -s:能夠本身選擇截圖的範圍

一下是個人 .zshrc 配置文件

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
  export ZSH="/home/jiaaaaaaaqi/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="cloud"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
    git
    pip
    sudo
    thefuck
    autojump
    web-search
    last-working-dir
    zsh-syntax-highlighting
)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
相關文章
相關標籤/搜索