zsh - item2 - oh-my-zsh
安装
 主题
 插件
[官网] https://github.com/ohmyzsh/ohmyzsh/wiki
安装
- git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
 - 备份之前的配置文件 $ cp ~/.zshrc ~/.zshrc.bak
 - cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc , 然后把上面备份的写回来
 - 切换默认shell为zsh:chsh -s /bin/zsh
 - source ~/.zshrc
 
更换主题(第三方)
主题汇总: https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes
如何更换第三方主题
更换主题为 Dracula
cd ~/.oh-my-zsh/themes
 git clone https://github.com/dracula/zsh.git dracula
 vim ~/.zshrc
 ZSH_THEME=“dracula/dracula”
 source ~./.zshrc
插件
下载到用户名下.zsh文件夹下
cd ~/.zsh 如果没有创建mkdir ~/.zsh
语法高亮插件 zsh-syntax-highlighting
 git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
 vim ~/.zshrc
 source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
自动补全插件 zsh-autosuggestions
 git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
 vim ~/.zshrc
 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
按↑即可补全
自动跳转插件 autojump
clone 到本地
git clone git://github.com/joelthelion/autojump.git
进入clone目录,接着执行安装文件
cd autojump
 ./install.py
接着根据安装完成后的提示,在~/.bashrc最后添加下面语句:
vim ~/.bashrc
 [[ -s /home/misfit/.autojump/etc/profile.d/autojump.sh ]] && source /home/misfit/.autojump/etc/profile.d/autojump.sh
autojump 工作原理:它会在你每次启动命令时记录你当前位置,并把它添加进它自身的数据库中。这样,某些目录比其它一些目录添加的次数多,这些目录一般就代表你最重要的目录,而它们的“权重”也会增大。
查看版本:
 j -v
 目录跳转:
 j [目录的名字或名字的一部分] // 不受当前所在目录的限制
查看当前权重:
 j --stat
进入权重最高的目录:
 j
改变当前目录权重值:
 j -i [权重] // 增加
 j -d [权重] // 减少
————————————————————————————————————————————————————————
Item2
一些功能和快捷键:
 鼠标选中即复制;
 command + d 垂直分屏
 command + shift + d 水平分屏
 command + shift + h 打开剪切板(复制历史)
 command + ; 命令自动完成
 command + shift + ; 查看历史命令
 command + option + b 按键回放(输入命令回放, 通过时间线)









