-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
86 lines (67 loc) · 2.8 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Ctrl-a as prefix instead of Ctrl-b
set -g prefix C-a
unbind C-b
# have `C-a C-a` send C-a keypress to the current window
bind C-a send-prefix
# Smart pane switching with awareness of vim splits
bind -n C-k run-shell 'tmux-vim-select-pane -U'
bind -n C-j run-shell 'tmux-vim-select-pane -D'
bind -n C-h run-shell 'tmux-vim-select-pane -L'
bind -n C-l run-shell 'tmux-vim-select-pane -R'
bind -n "C-\\" run-shell 'tmux-vim-select-pane -l'
# Bring back clear screen under tmux prefix
bind C-l send-keys 'C-l'
# Bring back kill line under tmux prefix
bind C-k send-keys 'C-k'
# Have new windows and panes open in the current directory
bind '"' split-window -c '#{pane_current_path}'
bind % split-window -c '#{pane_current_path}' -h
bind c new-window -c '#{pane_current_path}'
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# <Enter> in copy mode puts the text in system clipboard
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe 'reattach-to-user-namespace pbcopy'
# switch to a session that start with the given name
bind S command-prompt -p session: "run-shell 'tmux-switch-session \"%%\"'"
bind v command-prompt -p open: "new-window -a -n '%1' 'bundle open %1' -c '#{pane_current_path}'"
bind m command-prompt -p man: "split-window -h 'man %1'"
#bind g new-window -a -n log 'tail -f log/development.log' -c '#{pane_current_path}'
# source this file after changes
bind R source-file ~/.tmux.conf
# enable for iTerm (Terminal.app doesn't have mouse support)
set -g mouse on
# Faster escape sequences (default is 500ms).
# This helps when exiting insert mode in Vim: http://superuser.com/a/252717/65504
set -s escape-time 50
# start numbering windows from 1 instead of zero
set -g base-index 1
# syntax highlighting in Vim
set -g default-terminal "screen-256color"
# enable clipboard http://goo.gl/DN82E
# enable RubyMotion http://goo.gl/WDlCy
set -g default-command "reattach-to-user-namespace -l zsh"
# disable programs changing window names via terminal escape sequence
set-window-option -g allow-rename off
# status bar
set -g status-fg colour8
set -g status-bg colour234
# current session
set -g status-left ' #S '
set -g status-left-length 15
set -g status-left-fg colour229
set -g status-left-bg colour166
# window list
set -g window-status-format "#[fg=colour8] #I #[fg=colour231]#W#[fg=colour166]#F "
set -g window-status-current-format "#[fg=colour117,bg=colour31] #I #[fg=colour231]#W#[fg=colour234]#F "
set -g window-status-separator ""
# battery and pomo status <http://git.io/zMf0IA>
set -g status-right ' #(battery) '
set -g status-interval 15
# disable possibly set visual editor
set-environment -gu GEM_EDITOR
set -g history-limit 10000
# vim:ft=conf: