c a n d l a n d . n e t

ITerm2 TMux and Vim Setup

Dusty Candland | | iterm2, tmux, vim

Setup

  • Install MacVim
  • Install ITerm2
  • Install Tmux: brew install tmux
  • Install Tmux Patch for copy to OSX: tmux-MacOSX-pasteboard
  • Change shell to zsh chsh -s /bin/zsh && sudo chsh -s /bin/zsh username

Tmux Config

This sets some nice things for tmux. Of note, changing the default prefix to Ctrl+a and setting up the copy patch.

/.tmux.conf

set -g default-terminal "screen-256color"
setw -g mode-mouse on
set -g prefix C-a

setw -g mode-keys vi

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+

# copy to osx
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind ^y run-shell "reattach-to-user-namespace -l zsh -c 'tmux showb | pbcopy'"

# quick pane cycling
unbind ^a
bind ^a select-pane -t :.+

VIM

Had to add

syn on

to my .vimrc to get syntax highlighting in console mode.

Resources

Webmentions

These are webmentions via the IndieWeb and webmention.io. Mention this post from your site: