VIM注释颜色看不到解决方案:
系统终端开启256支持 export TERM="xterm-256color" >> .bashrc
常用快捷键
| 命令 | 备注 |
|---|---|
| C-b C-o | 调换窗口位置 |
| C-b 空格键 | 采用下一个内置布局 |
| C-b w | 以菜单方式显示及选择窗口 |
| C-b s | 以菜单方式显示和选择会话 |
| C-b [ | 复制(空格开始) |
| C-b ] | 粘贴(回车结束) |
| C-b , | 给当前窗口改名 |
| C-b & | 关闭window |
| C-b d | 脱离当前会话; |
| C-b D | 选择要脱离的会话;在同时开启了多个会话时使用 |
| C-b C-z | 挂起当前会话 |
| C-b s | list session |
| C-b $ | rename seesion |
| C-b c | 创建一个新窗口 |
| C-b & | 关闭当前窗口 |
| C-b , | 重命名当前窗口;这样便于识别 |
| C-b . | 修改当前窗口编号;相当于窗口重新排序 |
| C-b ! | 将当前面板置于新窗口;即新建一个窗口,其中仅包含当前面板 |
Tmux 命令
| Tmux命令 | 解释 |
|---|---|
| tmux list-session | |
| tmux new-session <会话名> | |
| tmux attach-session -t <会话名> | |
| tmux rename-session -t <会话名> | |
| tmux choose-session -t <会话名> | |
| tmux kill-session -t <会话名> |
Tmux 配置
# Our .tmux.conf file# Setting the prefix from C-b to C-aset -g prefix C-a# Free the original Ctrl-b prefix keybindingunbind C-b#setting the delay between prefix and commandset -s escape-time 1# 使用鼠标滚轮滑动屏幕set -g mouse on# Ensure that we can send Ctrl-A to other appsbind C-a send-prefix# Set the base index for windows to 2 instead of 0set -g base-index 1# Set the base index for panes to 1 instead of 0setw -g pane-base-index 1# Reload the file with Prefix rbind r source-file ~/.tmux.conf \; display "Reloaded!"# splitting panesbind | split-window -hbind - split-window -v# moving between panesbind h select-pane -Lbind j select-pane -Dbind k select-pane -Ubind l select-pane -R# Quick pane selectionbind -r C-h select-window -t :-bind -r C-l select-window -t :+# Pane resizingbind -r H resize-pane -L 5bind -r J resize-pane -D 5bind -r K resize-pane -U 5bind -r L resize-pane -R 5# mouse support - set to on if you want to use the mousesetw -g mode-mouse offset -g mouse-select-pane offset -g mouse-resize-pane offset -g mouse-select-window off# Set the default terminal mode to 256color modeset -g default-terminal "screen-256color"# set the status line's colorsset -g status-fg whiteset -g status-bg black# set the color of the window listsetw -g window-status-fg cyansetw -g window-status-bg defaultsetw -g window-status-attr dim# set colors for the active windowsetw -g window-status-current-fg whitesetw -g window-status-current-bg redsetw -g window-status-current-attr bright# pane colorsset -g pane-border-fg white#set -g pane-border-bg blackset -g pane-active-border-fg green#set -g pane-active-border-bg yellow# Command / message lineset -g message-fg whiteset -g message-bg blackset -g message-attr bright#START:utf8set -g status-utf8 on# Center the window listset -g status-justify centre# Status line left sideset -g status-left ''#set -g status-left-length 40#set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"# Status line right side# 15% | 28 Nov 18:15set -g status-right "#[fg=cyan]%d %b %R"#2015-11-23 11:34#set -g status-right '#[fg=green][#[fg=cyan]%Y-%m-%d %H:%M#[fg=green]]'# Update the status bar every sixty secondsset -g status-interval 60# enable vi keys.setw -g mode-keys vi# set scrollback history to 10000 (10k)set -g history-limit 1000# visual notification of activity in other windowssetw -g monitor-activity onset -g visual-activity on# visual Copy & Pastebind-key -t vi-copy 'v' begin-selectionbind-key -t vi-copy 'y' copy-selection#set-option -g default-command "reattach-to-user-namespace -l zsh"# Session 恢复run-shell ~/.tmux/tmux-resurrect/resurrect.tmuxrun-shell ~/.tmux/tmux-continuum/continuum.tmux# 禁止重命名窗口名称set-option -g allow-rename off
FAQ
1. 打通 tmux 与系统中使用复制粘贴
https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
相关文章:https://evertpot.com/osx-tmux-vim-copy-paste-clipboard/
