Skip to content

Instantly share code, notes, and snippets.

@luutuankiet
Last active May 30, 2024 18:51
Show Gist options
  • Save luutuankiet/fbb70fca0f7f948c4e102442d76c363e to your computer and use it in GitHub Desktop.
Save luutuankiet/fbb70fca0f7f948c4e102442d76c363e to your computer and use it in GitHub Desktop.
terminal-utils-setup
#!/bin/bash
# usage : either paste all the contents to terminal or use curl : `curl -fsSL <link to this gist> | bash`
# Function to print a section header
print_section() {
local section_title=$1
echo
echo "================================="
echo " $section_title"
echo "================================="
echo
}
# clean slate of oh my zsh
if [ -d "$HOME/.oh-my-zsh" ]; then
rm -rf "$HOME/.oh-my-zsh"
fi
# Print the start of the script
print_section "SETUP ZSH"
sudo apt-get update
# INSTALL ZSH PLUGINS START
sudo apt install -y \
curl git zsh-autosuggestions zsh vim tree && \
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
cd ~/.oh-my-zsh/plugins && \
sed -i '/plugins=(git)/c\plugins=(git zsh-autosuggestions)' ~/.zshrc && \
git clone https://github.com/zsh-users/zsh-autosuggestions.git
# INSTALL ZSH PLUGINS DONE
print_section "INSTALL KEN's DOTFILES"
# INSTALL ken's dotfiles
sudo apt install -y tmux && \
curl -fsSL \
https://raw.githubusercontent.com/luutuankiet/config-backups/main/.tmux.conf \
-o ~/.tmux.conf && \
## set up vundle for vim. when launching vim initially run `:PluginInstall` to install the plugins.
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim && \
curl -fsSL \
https://raw.githubusercontent.com/luutuankiet/config-backups/main/.vimrc \
-o ~/.vimrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment