Skip to content
This repository
Browse code

Added tmux support [Fix #190]

  • Loading branch information...
commit 273db6a5957b3ee0fe5aa2c10a24fd97db19c388 1 parent 4a14767
Yan Pritzker authored November 11, 2012
3  README.md
Source Rendered
@@ -80,10 +80,9 @@ We automatically install a few useful packages including ack, ctags, git, and hu
80 80
 You can install macvim from brew as well, or download it from their website.
81 81
 
82 82
 ```bash
83  
-brew install ack ctags git hub macvim
  83
+brew install ack ctags git hub macvim tmux reattach-to-user-namespace
84 84
 ```
85 85
 
86  
-
87 86
 ### Github Issues: [ghi gem](https://github.com/stephencelis/ghi)
88 87
 
89 88
 We include the `ghi` command. Try `ghi list` and have fun managing issues from command line!
1  Rakefile
@@ -16,6 +16,7 @@ task :install => [:submodule_init, :submodules] do
16 16
   file_operation(Dir.glob('irb/*')) if want_to_install?('irb/pry configs (more colorful)')
17 17
   file_operation(Dir.glob('ruby/*')) if want_to_install?('rubygems config (faster/no docs)')
18 18
   file_operation(Dir.glob('ctags/*')) if want_to_install?('ctags config (better js/ruby support)')
  19
+  file_operation(Dir.glob('tmux/*')) if want_to_install?('tmux config')
19 20
   file_operation(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools')
20 21
   file_operation(Dir.glob('{vim,vimrc}')) if want_to_install?('vim configuration (highly recommended)')
21 22
 
73  tmux/tmux.conf
... ...
@@ -0,0 +1,73 @@
  1
+# Ring the bell if any background window rang a bell
  2
+set -g bell-action any
  3
+
  4
+# Default termtype. If the rcfile sets $TERM, that overrides this value.
  5
+set -g default-terminal screen-256color
  6
+# set -g default-terminal "screen-256color"
  7
+#
  8
+set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
  9
+
  10
+# Keep your finger on ctrl, or don't
  11
+bind-key ^D detach-client
  12
+
  13
+# Create splits and vertical splits
  14
+bind-key v split-window -h
  15
+bind-key ^V split-window -h
  16
+bind-key s split-window
  17
+bind-key ^S split-window
  18
+
  19
+# Pane resize in all four directions using vi bindings.
  20
+# Can use these raw but I map them to shift-ctrl-<h,j,k,l> in iTerm.
  21
+bind-key J resize-pane -D
  22
+bind-key K resize-pane -U
  23
+bind-key H resize-pane -L
  24
+bind-key L resize-pane -R
  25
+
  26
+# Use vi keybindings for tmux commandline input.
  27
+# Note that to get command mode you need to hit ESC twice...
  28
+set -g status-keys vi
  29
+ 
  30
+# Use vi keybindings in copy and choice modes
  31
+setw -g mode-keys vi
  32
+# 
  33
+# easily toggle synchronization (mnemonic: e is for echo)
  34
+# sends input to all panes in a given window.
  35
+bind e setw synchronize-panes on
  36
+bind E setw synchronize-panes off
  37
+
  38
+# set first window to index 1 (not 0) to map more to the keyboard layout...
  39
+set -g base-index 1
  40
+
  41
+# color scheme (styled as vim-powerline)
  42
+set -g status-left-length 52
  43
+set -g status-right-length 451
  44
+set -g status-fg white
  45
+set -g status-bg colour234
  46
+set -g pane-border-fg colour245
  47
+set -g pane-active-border-fg colour39
  48
+set -g message-fg colour16
  49
+set -g message-bg colour221
  50
+set -g message-attr bold
  51
+set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
  52
+set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I #W "
  53
+#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
  54
+#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
  55
+set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]⮀"
  56
+
  57
+# Patch for OS X pbpaste and pbcopy under tmux.
  58
+# set-option -g default-command "reattach-to-user-namespace -l zsh"
  59
+
  60
+# Screen like binding
  61
+unbind C-b
  62
+set -g prefix C-a
  63
+
  64
+# No escape time for vi mode
  65
+set -sg escape-time 0
  66
+
  67
+# Screen like binding for last window
  68
+unbind l
  69
+bind C-a last-window
  70
+
  71
+# Bigger history
  72
+set -g history-limit 10000
  73
+#

0 notes on commit 273db6a

Please sign in to comment.
Something went wrong with that request. Please try again.