Permalink
Browse files

Vim and tmux tweaks

  • Loading branch information...
csexton committed Jun 1, 2012
1 parent c85a8a8 commit 1559cb2f608d8522ddefd154219c1059697dcc40
Showing with 110 additions and 84 deletions.
  1. +96 −84 home/tmux.conf
  2. +14 −0 home/vim-bundles
View
@@ -1,97 +1,109 @@
-#set-option -g mouse-select-pane on
-set-option -g status-keys vi
-set-option -g bell-action any
-set-option -g set-titles on
-set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
-set-option -g visual-bell on
-
-setw -g mode-keys vi
-#setw -g mode-mouse on
-setw -g mode-mouse off
-set-window-option -g mode-mouse off
-setw -g monitor-activity on
-
-bind e previous-window
-bind f next-window
-
-bind b next-window
+# Ust
+# something easier to type as the prefix.
+# set -g prefix C-f
+# unbind C-b
+# bind C-f send-prefix
bind C-b next-window
+bind C-l last-window
+# Relax!
+#set -sg escape-time 0
+#set -sg repeat-time 600
-#unbind C-b
-#set -g prefix C-j
-
-set-option -g status-utf8 on
-# set-option -g status-justify centre
-set-option -g status-justify left
-set-option -g status-bg black
-set-option -g status-fg white
-set-option -g status-left-length 40
-
-set-option -g pane-active-border-fg green
-set-option -g pane-active-border-bg black
-set-option -g pane-border-fg white
-set-option -g pane-border-bg black
-
-set-option -g message-fg black
-set-option -g message-bg green
-
-#setw -g mode-bg black
-
-setw -g window-status-bg black
-setw -g window-status-current-fg green
-setw -g window-status-alert-attr default
-setw -g window-status-alert-fg yellow
-
-set -g status-left '#[fg=blue]#S #[fg=green] #[default]'
-
-#set -g status-right '#[fg=green]| #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
-set -g status-right '#[fg=green]#H'
-
-set -g history-limit 4096
-
-# `+r reloads the configuration, handy
-bind r source-file ~/.tmux.conf
-
-#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
-
+# This is hilariously absurd. How many nerds use tmux on OS X every day and
+# it's still fundamentally broken?
#set-option -g default-command "reattach-to-user-namespace -l zsh"
-set -g default-terminal "xterm-256color"
+set-option -g default-command "[[ -e `which reattach-to-user-namespace` ]] && reattach-to-user-namespace -l zsh || zsh"
-
-set-option -g default-command "reattach-to-user-namespace -l zsh" # or bash
-bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy"
+bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
+# Less stretching to get to the first item.
+set -g base-index 1
+setw -g pane-base-index 1
+
+# Reload the config.
+bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
+
+# Saner splitting.
+bind v split-window -h
+bind s split-window -v
+bind S choose-session
+
+## Pane movement
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+
+# DVTM style pane selection
+bind 1 select-pane -t 1
+bind 2 select-pane -t 2
+bind 3 select-pane -t 3
+bind 4 select-pane -t 4
+bind 5 select-pane -t 5
+bind 6 select-pane -t 6
+bind 7 select-pane -t 7
+bind 8 select-pane -t 8
+bind 9 select-pane -t 9
+
+# Pane resizing
+bind -r C-h resize-pane -L 5
+bind -r C-j resize-pane -D 5
+bind -r C-k resize-pane -U 5
+bind -r C-l resize-pane -R 5
+
+# Window movement
+# Only really makes sense if you have your parens bound to shifts like me.
+#bind -r ( select-window -t :-
+#bind -r ) select-window -t :+
+
+# 256 colors please
+set -g default-terminal "screen-256color"
+
+# Bad Wolf
+set -g status-fg white
+set -g status-bg colour234
+set -g window-status-activity-attr bold
+set -g pane-border-fg colour245
+set -g pane-active-border-fg colour39
+set -g message-fg colour16
+set -g message-bg colour221
+set -g message-attr bold
+#
+# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
+set -g status-left-length 32
+set -g status-right-length 150
+set -g status-interval 5
+
+#et -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour238,nobold]⮀#[fg=colour15,bg=colour238,bold] #(ls ~/.mail/steve-stevelosh.com/INBOX/cur ~/.mail/steve-stevelosh.com/INBOX/new | wc -l | tr -d " ") #[fg=colour238,bg=colour234,nobold]⮀'
+set -g status-left '#[fg=colour254,bg=colour238,nobold] #S '
+
+set -g status-right '#[fg=colour245]| #h '
+
+set -g window-status-format "#[fg=white,bg=colour234] #I #W "
+set -g window-status-current-format "#[fg=colour16,bg=colour39,noreverse,bold] #I | #W #[fg=colour39,bg=colour234,nobold]"
+
+# Activity
+setw -g monitor-activity on
+set -g visual-activity off
-#### COLOUR
-
-# default statusbar colors
-set-option -g status-bg colour235 #base02
-set-option -g status-fg colour136 #yellow
-set-option -g status-attr default
-
-# default window title colors
-set-window-option -g window-status-fg colour244
-set-window-option -g window-status-bg default
-#set-window-option -g window-status-attr dim
+# Autorename sanely.
+setw -g automatic-rename on
+setw -g allow-rename off
-# active window title colors
-set-window-option -g window-status-current-fg colour166 #orange
-set-window-option -g window-status-current-bg default
-#set-window-option -g window-status-current-attr bright
+# Better name management
+bind C new-window \; command-prompt "rename-window '%%'"
+bind c new-window
+#bind , command-prompt "rename-window '%%'"
-# pane border
-set-option -g pane-border-fg colour235 #base02
-set-option -g pane-active-border-fg colour240 #base01
+# Copy mode
+setw -g mode-keys vi
+bind [ copy-mode
+unbind p
+bind p paste-buffer
+bind -t vi-copy v begin-selection
+bind -t vi-copy y copy-selection
-# message text
-set-option -g message-bg colour235 #base02
-set-option -g message-fg colour166 #orange
-# pane number display
-set-option -g display-panes-active-colour colour33 #blue
-set-option -g display-panes-colour colour166 #orange
-# clock
-set-window-option -g clock-mode-colour colour64 #green
View
@@ -0,0 +1,14 @@
+#csexton/jekyll.vim
+ChrisKempson/Vim-Tomorrow-Theme
+#Lokaltog/vim-powerline
+bbommarito/vim-slim
+
+#ap/vim-css-color
+#csexton/jslint.vim
+#int3/vim-extradite
+kana/vim-textobj-user
+#msanders/cocoa.vim
+nelstrom/vim-textobj-rubyblock
+#tomtom/tlib_vim
+#tpope/vim-commentary
+#tpope/vim-rvm

0 comments on commit 1559cb2

Please sign in to comment.