Mercurial
view vim-setup/start.sh @ 173:827c6ac504cd hg-web
Merged in default here.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 19 Jan 2026 18:59:10 -0800 |
| parents | 76cd7afa6b8e |
| children |
line wrap: on
line source
#!/bin/bash set -e # Not using plugin management since it is cancer PLUG_DIR="$HOME/.vim/pack/plugins/start" THEME_DIR="$HOME/.vim/pack/themes/start" NEOVIM_DIR="$HOME/.config/nvim/pack" mkdir -p "$NEOVIM_DIR" mkdir -p "$PLUG_DIR" mkdir -p "$THEME_DIR" echo "---Installing system dependencies---" if [[ "$(uname)" == "Darwin" ]]; then echo "Assuming OS is mac" brew install ripgrep vim git curl neovim else echo "Assuming OS is linux" sudo apt update sudo apt install -y ripgrep vim git curl neovim fi echo "---Installing fzf binary---" if [ ! -d "$HOME/.fzf" ]; then git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install --no-key-bindings --no-completion --no-update-rc else echo "fzf already installed" fi echo "---Installing fzf.vim---" git clone --depth 1 https://github.com/junegunn/fzf.vim.git "$PLUG_DIR/fzf.vim" echo "Linking fzf Vim plugin files..." ln -sf ~/.fzf/plugin "$PLUG_DIR/fzf" ln -sf ~/.fzf/autoload "$PLUG_DIR/fzf" echo "---Installing wiki.vim---" git clone --depth 1 https://github.com/lervag/wiki.vim.git "$PLUG_DIR/wiki.vim" echo "---Installing nightfly colorscheme---" git clone --depth 1 https://github.com/bluz71/vim-nightfly-colors.git "$THEME_DIR/nightfly" echo "---Link to neovim---" ln -s ~/.vim/pack ~/.config/nvim/pack echo "---Set vimrc into neovim" cat > ~/.config/nvim/init.vim <<EOF " Neovim compatibility for Vim config set runtimepath^=~/.vim runtimepath+=~/.vim/after let &packpath = &runtimepath EOF # Being safe cat .vimrc >> ~/.config/nvim/init.vim if [[ "$(uname)" == "Darwin" ]]; then echo "Assuming OS is mac" echo "export FZF_DEFAULT_COMMAND='fd --type f --hidden --ignore-file .ignore'" >> ~/.zshrc echo "export FZF_DEFAULT_OPTS='--bind \"ctrl-a:select-all,ctrl-d:deselect-all\"'" >> ~/.zshrc echo "Re-run ~/.zshrc" else echo "Assuming OS is linux" echo "export FZF_DEFAULT_COMMAND='fd --type f --hidden --ignore-file .ignore'" >> ~/.bashrc echo "export FZF_DEFAULT_OPTS='--bind \"ctrl-a:select-all,ctrl-d:deselect-all\"'" >> ~/.bashrc echo "Re-run ~/.bashrc" fi