Last active
December 21, 2019 18:14
-
-
Save telnet2/d23b862fa27bab4380fd870e9f1a2038 to your computer and use it in GitHub Desktop.
ZSH Cloud Setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZHOME="${ZDOTDIR:-$HOME}/.zprezto" | |
sudo apt-get install git software-properties-common | |
if [ ! -d "${ZHOME}" ]; then | |
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZHOME}" | |
git clone https://github.com/zdharma/fast-syntax-highlighting "${ZHOME}/modules/fast-syntax-highlighting" | |
if [ ! -d "${HOME}/.fzf" ]; then | |
git clone --depth 1 https://github.com/junegunn/fzf.git ${HOME}/.fzf | |
${HOME}/.fzf/install | |
fi | |
echo "# Rename .z* file to ._z* using glob qualifier (.) to select plain files only" | |
echo "# and (N) to ignore no match error; existing symlinks will not be changed." | |
for f in .z*(.DN); do mv $f $f:s/.z/.z_/ ; done | |
setopt EXTENDED_GLOB | |
for rcfile in "${ZHOME}"/runcoms/^README.md(.N); do | |
if [ ! -f "${ZDOTDIR:-$HOME}/.${rcfile:t}" ]; then | |
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" | |
fi | |
done | |
rm -rf ~/.zpreztorc | |
cat <<'EOF' >> ~/.zpreztorc | |
zstyle ':prezto:*:*' color 'yes' | |
zstyle ':prezto:load' pmodule \ | |
'fasd' \ | |
'environment' \ | |
'terminal' \ | |
'editor' \ | |
'history' \ | |
'directory' \ | |
'spectrum' \ | |
'utility' \ | |
'autosuggestions' \ | |
'completion' \ | |
'prompt' \ | |
'git' \ | |
'node' \ | |
'fast-syntax-highlighting' \ | |
'history-substring-search' | |
zstyle ':prezto:module:editor' key-bindings 'emacs' | |
zstyle ':prezto:module:prompt' theme 'sorin' | |
zstyle ':prezto:module:fzf' key-bindings 'yes' | |
zstyle ':prezto:module:fzf' completion 'yes' | |
zstyle ':prezto:module:fzf' height '30%' | |
zstyle ':prezto:module:fzf' tmux 'yes' | |
zstyle ':prezto:module:fzf' colorscheme 'Solarized Light' | |
EOF | |
cat <<'EOF' >> ~/.zshrc | |
source ~/.fzf.zsh | |
EOF | |
fi | |
if [ ! -d ~/.nvm ]; then | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash | |
if [ ! -f ~/.nvm/default-packages ]; then | |
cat <<'EOF' > ~/.nvm/default-packages | |
bunyan | |
nodemon | |
pm2 | |
pm2-logrotate | |
prettier | |
typescript | |
ts-node | |
yarn | |
EOF | |
fi | |
fi | |
sudo add-apt-repository -y ppa:jonathonf/vim | |
sudo apt-get update | |
sudo apt-get install -y vim | |
if [[ ! -d ~/.vim/bundle/Vundle.vim ]]; then | |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
fi | |
if [[ ! -f ~/.vimrc ]]; then | |
curl https://gist.githubusercontent.com/telnet2/048a582b5a3354ad70cab9c6f787390c/raw/870f6742fa15bf6c30a826dcfb863821db8e1aa9/.vimrc > ~/.vimrc | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment