Skip to content

Instantly share code, notes, and snippets.

@telnet2
Last active December 21, 2019 18:14
Show Gist options
  • Save telnet2/d23b862fa27bab4380fd870e9f1a2038 to your computer and use it in GitHub Desktop.
Save telnet2/d23b862fa27bab4380fd870e9f1a2038 to your computer and use it in GitHub Desktop.
ZSH Cloud Setting
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