mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
git add vim
This commit is contained in:
parent
3161779448
commit
08552871fc
@ -1,27 +1,65 @@
|
|||||||
# 配置管理
|
set -g prefix C-s #{{{
|
||||||
set -g prefix C-s
|
|
||||||
|
set default-terminal screen
|
||||||
|
#set default-shell /usr/bin/zsh
|
||||||
|
|
||||||
|
set -g mode-keys vi
|
||||||
|
set -g history-limit 500000
|
||||||
|
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
set -g display-panes-time 5000
|
set -g display-panes-time 5000
|
||||||
set -g display-time 5000
|
set -g display-time 5000
|
||||||
setw -g pane-base-index 1
|
|
||||||
|
|
||||||
set -g mode-keys vi
|
|
||||||
set -g history-limit 50000
|
setw -g pane-base-index 1
|
||||||
|
#}}}
|
||||||
|
set -g status off #{{{
|
||||||
|
#set -g status-keys emacs
|
||||||
|
#set -g status-interval 1
|
||||||
|
#
|
||||||
|
#set -g status-justify centre
|
||||||
|
#set -g status-style bg=green
|
||||||
|
#
|
||||||
|
#set -g status-left-length 40
|
||||||
|
#set -g status-left-style bg=red
|
||||||
|
#set -g status-left ' [%m-%d %H:%M] #[bg=magenta] #S #[bg=green][#h.local] '
|
||||||
|
#
|
||||||
|
#set -g status-right-length 40
|
||||||
|
#set -g status-right-style bg=green
|
||||||
|
#set -g status-right '[#(basename `pwd`)/]#[bg=cyan] #P #[bg=blue][#{cursor_x},#{cursor_y} #{pane_height}x#{pane_width}] '
|
||||||
|
#
|
||||||
|
#setw -g window-status-format ' #I:#W#F '
|
||||||
|
#setw -g window-status-separator " "
|
||||||
|
#setw -g window-status-style bg=green
|
||||||
|
#setw -g window-status-bell-style bg=red
|
||||||
|
#setw -g window-status-last-style bg=green
|
||||||
|
#setw -g window-status-current-style bg=red
|
||||||
|
#setw -g window-status-current-format ' #I:#W#F '
|
||||||
|
|
||||||
|
#}}}
|
||||||
|
|
||||||
bind Space command-prompt
|
bind Space command-prompt
|
||||||
|
# session # {{{
|
||||||
# 窗口管理
|
bind d detach-client
|
||||||
|
bind g command-prompt -p "rename session:" "rename-session %%"
|
||||||
|
bind r source ~/.tmux.conf \; refresh-client
|
||||||
|
bind t clock-mode
|
||||||
|
# }}}
|
||||||
|
#window #{{{
|
||||||
bind w choose-window
|
bind w choose-window
|
||||||
bind q confirm-before kill-window
|
bind q confirm-before kill-window
|
||||||
|
|
||||||
|
# bind b break-pane
|
||||||
|
bind b display-panes
|
||||||
bind c new-window
|
bind c new-window
|
||||||
|
|
||||||
bind o last-window
|
bind o last-window
|
||||||
bind n next-window
|
bind n next-window
|
||||||
bind p previous-window
|
bind p previous-window
|
||||||
|
|
||||||
bind m command-prompt -p "move window from:,to:" "swap-window -s %% -t %%"
|
bind f command-prompt -p "find: " "find-window '%%'"
|
||||||
|
bind e command-prompt -p "name: " "rename-window '%%'"
|
||||||
|
bind m command-prompt -p "from:,to:" "swap-window -s %% -t %%"
|
||||||
|
|
||||||
bind 1 select-window -t :1
|
bind 1 select-window -t :1
|
||||||
bind 2 select-window -t :2
|
bind 2 select-window -t :2
|
||||||
@ -30,7 +68,8 @@ bind 4 select-window -t :4
|
|||||||
bind 5 select-window -t :5
|
bind 5 select-window -t :5
|
||||||
bind 6 select-window -t :6
|
bind 6 select-window -t :6
|
||||||
|
|
||||||
# 面板管理
|
#}}}
|
||||||
|
#pane #{{{
|
||||||
bind i display-panes
|
bind i display-panes
|
||||||
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||||
|
|
||||||
@ -47,44 +86,48 @@ bind C-h command-prompt -p "size:" "resize-pane -L %%"
|
|||||||
bind C-l command-prompt -p "size:" "resize-pane -R %%"
|
bind C-l command-prompt -p "size:" "resize-pane -R %%"
|
||||||
bind C-j command-prompt -p "size:" "resize-pane -D %%"
|
bind C-j command-prompt -p "size:" "resize-pane -D %%"
|
||||||
bind C-k command-prompt -p "size:" "resize-pane -U %%"
|
bind C-k command-prompt -p "size:" "resize-pane -U %%"
|
||||||
bind C-m command-prompt -p "move pane from:,to:" "swap-pane -s %% -t %%"
|
bind C-m command-prompt -p "from:,to:" "swap-pane -s %% -t %%"
|
||||||
|
|
||||||
# 缓存管理
|
# bind C-u select-layout main-horizontal
|
||||||
|
# bind C-v select-layout main-vertical
|
||||||
|
bind C-t select-layout tiled
|
||||||
|
|
||||||
|
bind ! select-window -t .1
|
||||||
|
bind @ select-window -t .2
|
||||||
|
bind '#' select-window -t .3
|
||||||
|
bind '$' select-window -t .4
|
||||||
|
bind '%' select-window -t .5
|
||||||
|
|
||||||
|
#}}}
|
||||||
|
#buffers #{{{
|
||||||
|
bind y capture-pane
|
||||||
bind C-s copy-mode
|
bind C-s copy-mode
|
||||||
bind C-d clear-history
|
bind C-d clear-history
|
||||||
|
|
||||||
bind a choose-buffer
|
bind a choose-buffer
|
||||||
bind z paste-buffer
|
bind z paste-buffer
|
||||||
|
|
||||||
|
bind -t vi-copy v begin-selection
|
||||||
|
bind -t vi-copy c copy-selection
|
||||||
|
|
||||||
# tmux 1.x
|
bind -t vi-copy Space page-down
|
||||||
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "\
|
bind -t vi-copy f page-down
|
||||||
bind -t vi-copy e scroll-down; \
|
bind -t vi-copy b page-up
|
||||||
bind -t vi-copy y scroll-up; \
|
bind -t vi-copy e scroll-down
|
||||||
bind -t vi-copy d halfpage-down; \
|
bind -t vi-copy y scroll-up
|
||||||
bind -t vi-copy u halfpage-up; \
|
#}}}
|
||||||
bind -t vi-copy f page-down; \
|
|
||||||
bind -t vi-copy b page-up; \
|
|
||||||
bind -t vi-copy v begin-selection; \
|
|
||||||
bind -t vi-copy c copy-selection; \
|
|
||||||
bind -t vi-edit C-n history-down; \
|
|
||||||
bind -t vi-edit C-p history-up; \
|
|
||||||
bind -t vi-copy Space page-down; \
|
|
||||||
set -g mouse-select-window on; \
|
|
||||||
set -g mouse-select-pane on; \
|
|
||||||
set -g mouse-resize-pane on; \
|
|
||||||
"
|
|
||||||
|
|
||||||
# tmux 2.x
|
|
||||||
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "\
|
|
||||||
bind -T copy-mode-vi y send-keys -X scroll-down; \
|
|
||||||
bind -T copy-mode-vi e send-keys -X scroll-up; \
|
|
||||||
bind -T copy-mode-vi d send-keys -X halfpage-down; \
|
|
||||||
bind -T copy-mode-vi u send-keys -X halfpage-up; \
|
|
||||||
bind -T copy-mode-vi f send-keys -X page-down; \
|
|
||||||
bind -T copy-mode-vi b send-keys -X page-up; \
|
|
||||||
bind -T copy-mode-vi v send-keys -X begin-selection; \
|
|
||||||
bind -T copy-mode-vi c send-keys -X copy-selection; \
|
|
||||||
set -g mouse on; \
|
|
||||||
"
|
|
||||||
|
|
||||||
|
#version greate than 2.0# {{{
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "set -g mouse on"
|
||||||
|
# if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "set -g renumber-windows on"
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "setw -g -q utf8 on"
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "set -g -q status-utf8 on"
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "bind -t vi-copy d halfpage-down"
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "bind -t vi-copy u halfpage-up"
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "bind -t vi-copy a append-selection"
|
||||||
|
# }}}
|
||||||
|
#version less than 2.0# {{{
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "set -g mouse-resize-pane on"
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "set -g mouse-select-pane on"
|
||||||
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "set -g mouse-select-window on"
|
||||||
|
# }}}
|
||||||
|
@ -1,16 +1,3 @@
|
|||||||
export PROMPT=$LOCAL_PROMPT'%![%*]%c$ '
|
export PROMPT='vps%![%*]%c$ '
|
||||||
export EDITOR=vim
|
export GOPATH=~/etcvpn:$GOPATH
|
||||||
|
|
||||||
alias t='tmux'
|
|
||||||
alias v='vim'
|
|
||||||
alias g='git'
|
|
||||||
|
|
||||||
bindkey -e
|
|
||||||
bindkey jk accept-line
|
|
||||||
bindkey "^N" down-line-or-beginning-search
|
|
||||||
bindkey "^P" up-line-or-beginning-search
|
|
||||||
|
|
||||||
bindkey -M vicmd j down-line-or-beginning-search
|
|
||||||
bindkey -M vicmd k up-line-or-beginning-search
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user