Skip to content

Commit

Permalink
Fix tmux configuration issues
Browse files Browse the repository at this point in the history
* Tmux changes the way it configures Vim commands.
  (tmux/tmux#592)
* The readme instructions did not include instructions on how to install
  tpm.
  • Loading branch information
LandonSchropp authored and Landon Schropp committed Dec 12, 2017
1 parent 701ccbc commit 4f2b579
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
24 changes: 20 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,32 @@ gem install bundler

## tmux

tmux is a program that splits multiple terminals in the same window. The instructions for installing tmux were taken from [this gist](https://gist.github.com/simme/1297707).
[tmux](https://tmux.github.io/) is a utility that allows you to run multiple windows inside one terminal.

Install tmux with Homebrew and tmuxinator with `gem`.
First, install tmux with Homebrew.

``` shell
brew install tmux
```

Next, install [tpm](https://github.com/tmux-plugins/tpm) and use it to install the tmux plugins.

``` shell
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
$HOME/.tmux/plugins/tpm/bin/install_plugins
```

[tmuxinator](https://github.com/aziz/tmuxinator) allows you to rapidly create tmux workspaces by storing their configurations in files. You can install tmuxinator by installing its gem.

``` shell
brew install reattach-to-user-namespace tmux
gem install tmuxinator
```

[tmuxinator](https://github.com/aziz/tmuxinator) allows you to rapidly create tmux workspaces by storing their configurations in files. Install the tmuxinator gem using the shell.
Once all of this is done, you may have to tell tmux to reload the configuration file.

``` shell
tmux source-file ~/.tmux.conf
```

## Node.js

Expand Down
14 changes: 5 additions & 9 deletions tmux.conf.local
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ bind -n WheelDownPane select-pane -t= \; send-keys -M
set -g prefix 'C-s'
bind-key 'C-s' send-prefix

# Set up the default command to ensure the window's name is empty if it's not already defined and
# to reattach the user namespace to the current shell
set-option -g default-command 'reattach-to-user-namespace -l $SHELL;'

# Modify the split pane keyboard shortcuts
unbind %
unbind '"'
Expand Down Expand Up @@ -67,11 +63,11 @@ set -s escape-time 0

# Set up copy-mode keybindings
set-window-option -g mode-keys vi
bind-key -t vi-copy Escape cancel# exit copy mode; or hit q
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -Tcopy-mode-vi 'Escape' send -X cancel
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy
unbind -Tcopy-mode-vi 'Enter'
bind-key -Tcopy-mode-vi 'Enter' send -X copy-pipe-and-cancel pbcopy

# PLUGINS
set -g @plugin 'tmux-plugins/tpm'
Expand Down

0 comments on commit 4f2b579

Please sign in to comment.