ini 我的自定义tmux配置可以提高工作效率。别忘了在OSX中安装reattach-to-user-namespace以便复制粘贴工作。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini 我的自定义tmux配置可以提高工作效率。别忘了在OSX中安装reattach-to-user-namespace以便复制粘贴工作。相关的知识,希望对你有一定的参考价值。

set -g prefix C-a
unbind C-b
bind C-a send-prefix

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"


# Change the default delay
set -sg escape-time 1

# Fix the base indexes 
set -g base-index 1
setw -g pane-base-index 1

bind | split-window -h
bind - split-window -v

# Vim like select pane
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R

# Similar resize pane bindings
bind -r H resize-pane -L 5 
bind -r J resize-pane -D 5 
bind -r K resize-pane -U 5 
bind -r L resize-pane -R 5

# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+

# I want mouse to be active inside tmux
setw -g mode-mouse on
set -g mouse-select-pane on 
set -g mouse-resize-pane on 
set -g mouse-select-window on

# Force set 256 color terminal
set -g default-terminal "screen-256color"

# Set colors for the status bar
set -g status-fg white
set -g status-bg black

# setw is a shortcut for set-window-option
setw -g window-status-fg cyan 
setw -g window-status-bg default 
setw -g window-status-attr dim
setw -g window-status-current-fg white 
setw -g window-status-current-bg red
setw -g window-status-current-attr bright

set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white 
set -g pane-active-border-bg yellow

set -g message-fg white 
set -g message-bg black 
set -g message-attr bright

# Setting the status bar for tmux
# First setting the left panel
# it shows the session name in green, the current window number in yellow, and the current pane in cyan.
set -g status-utf8 on
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"

# Set the right panel
set -g status-right "#[fg=cyan]%d %b %R"

# Center the window list of the status bar
set -g status-justify centre

# Refresh the status bar every minute.
set -g status-interval 60

# Enable visual activity
setw -g monitor-activity on 
set -g visual-activity on

#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"

# 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"

ini TMUX-配置

unbind ^b
set -g prefix 'C-a'
bind r source-file ~/.tmux.conf \; display-message "Config reloaded"
set -g status-bg black
set -g status-fg white
set-option -g status-interval 5
set-window-option -g window-status-current-bg green
unbind '"'
bind j splitw -v -c '#{pane_current_path}'
unbind %
bind k splitw -h -c '#{pane_current_path}'
bind -r - select-pane -L
bind -r = select-pane -R
bind -r 9 select-pane -U
bind -r 0 select-pane -D
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/vim-tmux'
set -g @plugin 'nhdaly/tmux-scroll-copy-mode'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set-option -g mouse on
set -g @resurrect-save-bash-history 'on'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
run '~/.tmux/plugins/tpm/tpm'

以上是关于ini 我的自定义tmux配置可以提高工作效率。别忘了在OSX中安装reattach-to-user-namespace以便复制粘贴工作。的主要内容,如果未能解决你的问题,请参考以下文章

tmux使用及个性化配置

ini 我的Tmux配置风味

ini 我的tmux配置

提高工作效率的shell工具

提高工作效率的shell工具

别总是抱怨加班!掌握这4个Word技巧快速提高效率,职场必备!