全平臺zsh+oh-my-zsh配置
zsh安裝配置
- 全平臺安裝(略)
- 查看已有shell
cat /etc/shells
- 切換爲zsh
chsh -s /bin/zsh
切換後強烈建議重啓,否則有些情況下不能生效
- 安裝oh-my-zsh腳本
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- 安裝其他zsh插件
-
autojump
- 下載插件
git clone git://github.com/wting/autojump.git
- 安裝插件
cd autojump ./install.py or ./uninstall.py
- 啓用插件(.zshrc中配置)
plugins=(其他的插件 autojump)
-
zsh-autosuggestions
- 下載插件
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
- 啓用插件
plugins=(其他的插件 zsh-autosuggestions)
-
zsh-syntax-highlighting
- 下載插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- 啓用插件
plugins=(其他的插件 zsh-syntax-highlighting)
-
incr自動補全插件
- 下載插件
mkdir ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/incr/&&chmod 755 ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/incr/ wget https://mimosa-pudica.net/src/incr-0.2.zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/incr/
- 啓用插件(在.zshrc中插入以下內容)
source ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/incr/incr*.zsh
-
oh-my-zsh顯示全路徑設置
vim ~/.oh-my-zsh/themes/robbyrussell.zsh-theme
把第二行的%c替換爲[$PWD]
-
啓動自帶插件
plugins=(其他的插件 cp extract git z)
- 加載vimrc配置
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_awesome_vimrc.sh