Skip to content

Instantly share code, notes, and snippets.

@Ben-Epstein
Created July 8, 2023 18:22
Show Gist options
  • Save Ben-Epstein/75230b61d2cf782a5ae479f84f7694e5 to your computer and use it in GitHub Desktop.
Save Ben-Epstein/75230b61d2cf782a5ae479f84f7694e5 to your computer and use it in GitHub Desktop.
Setup iterm2

My personal setup preference (MacOS)

echo "syntax on\nset nu\n" >> ~/.vimrc
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
sed -i '' "s/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/g" ~/.zshrc
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i '' "s/robbyrussell/powerlevel10k\/powerlevel10k/g" ~/.zshrc
source ~/.zshrc
p10k configure

Then follow the instructions from p10k to customize your shell. Last, quit (CMD+Q) and re-start.

Explaining above
  1. Turn on line numbers and syntax highlighting for vim
  2. run ohmyzsh install script
  3. Download the autosuggestion extension
  4. Download the syntax highlighting extension
  5. Add those plugins to the zshrc
  6. Clone the powerlevel10k theme
  7. Set your ohmyzsh theme to p10k
  8. Reload zsh profile
  9. Run the powerlevel10k wizard

A few more things I couldn't figure out how to automate

I like seeing the tabs in fullscreen, but I want them to be black/transparent, not the default white. Enable (if disabled) with (CMD+shift+T)

Change the tab style:

  1. iTerm2 -> Settings -> Appearances -> General -> Theme: Minimal
  2. iTerm2 -> Settings -> Profiles -> Colors -> Uncheck the "Tab Color" radio button
  3. iTerm2 -> Settings -> Advanced -> Mouse -> "Scroll wheel sends arrow keys when in alternate screen mode": Yes
    1. This is what lets you scroll naturally in vim

Screenshot 2023-07-08 at 2 02 08 PM

Screenshot 2023-07-08 at 2 11 09 PM

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment