Skip to content

Instantly share code, notes, and snippets.

@dshevchuk
Last active January 19, 2019 21:24
Show Gist options
  • Save dshevchuk/d89222935512afbebb9458c2bd645c8d to your computer and use it in GitHub Desktop.
Save dshevchuk/d89222935512afbebb9458c2bd645c8d to your computer and use it in GitHub Desktop.
### According UPCATSE tmux trails
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
# To use Ctrl + Up/Down/Left/Right
#set-window-option -g xterm-keys on
#bind -n C-Left resize-pane -L 10
#bind -n C-Right resize-pane -R 10
#bind -n C-Down resize-pane -D 5
#bind -n C-Up resize-pane -U 5
# Reload conf tmux conf
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.cong reloaded"
# Open panes
bind - split-window -v -c "#{pane_current_path}"
bind \ split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Renumber tabs
set-option -g base-index 1
set-option -g renumber-window on
# Break pane into new tab
bind-key b break-pane -d
# Copy like in Vim style {
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
# for Tmux 2.4+
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment