Skip to content

Instantly share code, notes, and snippets.

@telnet2
Created February 9, 2026 18:31
Show Gist options
  • Select an option

  • Save telnet2/15dda81d00576870584252a92f3a7398 to your computer and use it in GitHub Desktop.

Select an option

Save telnet2/15dda81d00576870584252a92f3a7398 to your computer and use it in GitHub Desktop.
local-setup skill: zsh, prezto, sorinx theme, fzf, vim with Vundle

local-setup

Set up a local development environment with zsh, prezto, fzf, the sorinx prompt theme, and vim with Vundle plugins.

Usage

Run this skill on a new machine or container to bootstrap the shell and editor environment.

Instructions

0. Verify zsh

This setup requires zsh as the default shell.

Check

echo "$SHELL"

If the output is not a path ending in zsh (e.g. /bin/zsh or /usr/bin/zsh), ask the user:

Your default shell is $SHELL. This setup requires zsh. Would you like to switch your default shell to zsh?

If the user agrees:

  1. First verify zsh is installed:
command -v zsh

If zsh is not found, install it:

  • macOS: zsh is pre-installed since Catalina. If missing: brew install zsh
  • Ubuntu/Debian: sudo apt-get update && sudo apt-get install -y zsh
  • Fedora: sudo dnf install -y zsh
  • Arch: sudo pacman -S --noconfirm zsh
  • Alpine: sudo apk add zsh
  1. Change the default shell. This requires the user's password:
chsh -s "$(command -v zsh)"

If chsh fails due to permissions (e.g. in a container or restricted environment), instruct the user:

Run sudo chsh -s $(command -v zsh) $USER or add exec zsh to the end of your ~/.bashrc.

Do not proceed with the remaining steps until zsh is confirmed as available.


1. Download setup.sh

Download the setup script from the gist:

curl -fsSL "https://gist.githubusercontent.com/telnet2/5b2ec3bbaeda06f8f337830a52d724d2/raw/setup.zsh" -o /tmp/setup.sh

2. Run setup.sh with zsh

The script must be run with zsh because it uses zsh-specific glob qualifiers (e.g. (.DN), (z)):

zsh /tmp/setup.sh

This script performs the following (skipping components that already exist):

  • Clones prezto to ~/.zprezto with fast-syntax-highlighting module
  • Backs up existing .z* dotfiles and symlinks prezto runcoms
  • Writes ~/.zpreztorc with modules: fasd, environment, terminal, editor, history, directory, spectrum, utility, autosuggestions, completion, prompt, git, node, fast-syntax-highlighting, history-substring-search
  • Sets locale to en_US.UTF-8 in ~/.zshrc
  • Clones fzf to ~/.fzf and runs its installer
  • Clones Vundle to ~/.vim/bundle/Vundle.vim
  • Downloads a pre-configured .vimrc

Verify

After running, confirm these exist:

ls -d ~/.zprezto ~/.fzf ~/.vim/bundle/Vundle.vim ~/.vimrc ~/.zpreztorc

If any are missing, the script may have encountered an error. Check the output and re-run if needed.


3. Install sorinx theme

Download the sorinx prompt theme and its installer:

curl -fsSL "https://gist.githubusercontent.com/telnet2/affe231f01922b1b0ec28a2702fff0f9/raw/prompt_sorinx_setup" -o ~/.zprezto/modules/prompt/functions/prompt_sorinx_setup

Then update ~/.zpreztorc to use the sorinx theme instead of sorin:

sed -i.bak "s/theme 'sorin'/theme 'sorinx'/" ~/.zpreztorc && rm -f ~/.zpreztorc.bak

On macOS, use:

sed -i '' "s/theme 'sorin'/theme 'sorinx'/" ~/.zpreztorc

Verify

grep "theme" ~/.zpreztorc

Expected output should contain theme 'sorinx'.


4. Install vim plugins

Install all Vundle plugins in headless mode without launching an interactive vim session:

vim -E -s -u ~/.vimrc +PluginInstall +qall

If vim -E has issues (some plugins produce errors in Ex mode), use this alternative:

vim +PluginInstall +qall < /dev/null > /dev/null 2>&1

This runs vim with a null stdin so it doesn't wait for user input, installs all plugins defined in .vimrc via Vundle, then exits.

Verify

ls ~/.vim/bundle/ | head -20

You should see directories for the configured plugins (e.g. nerdtree, vim-fugitive, ctrlp.vim, vim-colors-solarized, etc.).


5. Apply changes

Start a new zsh session to load the full configuration:

exec zsh

Platform dispatch summary

Step macOS Ubuntu/Debian Fedora Other Linux
zsh pre-installed apt-get install zsh dnf install zsh install via pkg mgr
setup.sh zsh /tmp/setup.sh zsh /tmp/setup.sh same same
locale-gen not needed may need sudo locale-gen same varies
sorinx theme sed -i '' sed -i.bak sed -i.bak sed -i.bak
vim plugins headless vim +PluginInstall +qall same same same
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment