Last active
December 6, 2016 05:13
-
-
Save RupGautam/f0ac0266cc2d5c2bd8a53b778e8338f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -g default-terminal "screen-256color" | |
| # unbind default prefix and set it to Ctrl+a | |
| unbind C-b | |
| set -g prefix C-a | |
| bind C-a send-prefix | |
| ###################### | |
| #### Key Bindings #### | |
| ###################### | |
| # reload config file | |
| bind r source-file ~/.tmux.conf \; display "Config Reloaded!" | |
| # split window and fix path for tmux 1.9 | |
| bind | split-window -h -c "#{pane_current_path}" | |
| bind - split-window -v -c "#{pane_current_path}" | |
| # synchronize all panes in a window | |
| bind y setw synchronize-panes | |
| # pane movement shortcuts | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| bind -r C-h select-window -t :- | |
| bind -r C-l select-window -t :+ | |
| # Resize pane shortcuts | |
| bind -r H resize-pane -L 10 | |
| bind -r J resize-pane -D 10 | |
| bind -r K resize-pane -U 10 | |
| bind -r L resize-pane -R 10 | |
| # enable mouse support for switching panes/windows | |
| # NOTE: This breaks selecting/copying text on OSX | |
| # To select text as expected, hold Option to disable it (iTerm2) | |
| setw -g mouse on | |
| # set vi mode for copy mode | |
| setw -g mode-keys vi | |
| # more settings to make copy-mode more vim-like | |
| unbind [ | |
| bind Escape copy-mode | |
| unbind p | |
| bind p paste-buffer | |
| bind -t vi-copy 'v' begin-selection | |
| bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
| # Update default binding of `Enter` to also use copy-pipe | |
| unbind -t vi-copy Enter | |
| bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
| # Buffers to/from Mac clipboard, yay tmux book from pragprog | |
| bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
| bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" | |
| set-option -g default-command "reattach-to-user-namespace -l zsh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| windows: | |
| - name: three-spilt-windows | |
| root: ~/Documents | |
| layout: main-vertical | |
| panes: | |
| - cd ~/Documents/The\ Fundamentals; clear; ipython | |
| - commands: | |
| - htop | |
| name: 'Documents' | |
| - ssh pi@192.168.0.50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment