set -g prefix ^a

unbind ^b
bind a send-prefix

unbind '"'
bind - splitw -v
unbind %
bind \ splitw -h
bind r source-file ~/.tmux.conf \;

unbind C-[
unbind C-]
bind C-n new-session

bind Tab last-window

#set status-interval 1
set-option -g status on
set-option -g status-interval 1
set-option -g status-justify "left"
set-option -g status-left-length 60
set-option -g status-right-length 90
#选择分割的窗格
bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R
#重新调整窗格的大小
bind ^k resizep -U 10
bind ^j resizep -D 10
bind ^h resizep -L 10
bind ^l resizep -R 10
#swap to panels
bind ^u swapp -U
bind ^d swapp -D

set -g status-fg colour055
set -g status-bg colour032
set -g default-terminal "screen-256color"

# 对齐方式
set-option -g status-justify left

# 左下角
# set-option -g status-left '#[bg=black,fg=green][#[fg=blue]#S#[fg=green]]'
set-option -g status-left-length 20
set-option -g allow-rename off #do not change your window title automaticly.
set-window-option -g window-status-format '#[fg=colour226,bold]#I:#W_#{window_panes}'
# add count for your window pannels.
set-window-option -g window-status-current-format '#[fg=colour046,bold]<<#I:#W_#{window_panes}>>'
set -g status-right '#[fg=colour226,bold][%Y-%m-%d %H:%M:%S]'

## just for mac settings.
## install reattach-to-user-namespace first.
## Copy-paste integration
## Use vim keybindings in copy mode
## Setup 'v' to begin selection as in Vim
# set-option -g default-command "reattach-to-user-namespace -l zsh"
## if your are in osx env , uncomment line up.

# setw -g mode-keys vi
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# unbind -t vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"

if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"

set-option -g mouse on

# List of plugins
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'NHDaly/tmux-scroll-copy-mode'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'

# setting for tmux-resurrect
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @scroll-down-exit-copy-mode "on"
set -g @scroll-in-moused-over-pane "on"
set -g @scroll-without-changing-pane "on"
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"

run '~/.tmux/plugins/tpm/tpm'

linux tmux 工具使用 tmux.conf 文件的更多相关文章

  1. linux根文件系统 /etc/resolv.conf 文件详解

    Linux根文件系统/etc/resolv.conf文件,它是DNS客户机配置文件,用于设置DNS服务器的IP地址及DNS域名,还包含了主机的域名搜索顺序.该文件是由域名解析器(resolver,以恶 ...

  2. Linux中redis的redis.conf文件的移动

    Linux中启动redis的过程我想大家都会,但是正常使用redis包目录下启动redis时会出现以下页面: 那么此时只有按ctrl + c退出redis才能使用命令行输入别的命令,这种有点不方便. ...

  3. linux系统中/etc/syslog.conf文件解读

    1: syslog.conf的介绍 对于不同类型的Unix,标准UnixLog系统的设置,实际上除了一些关键词的不同,系统的syslog.conf格式是相同的.syslog采用可配置的.统一的系统登记 ...

  4. linux根文件系统 /etc/resolv.conf 文件详解(转)

    大家好,今天51开源给大家介绍一个在配置文件,那就是/etc/resolv.conf.很多网友对此文件的用处不太了解.其实并不复杂,它是DNS客户机配置文件,用于设置DNS服务器的IP地址及DNS域名 ...

  5. 漫画:Linux中/etc/resolv.conf文件和puppet工具解析

    今天办公室里来了一个程序员妹子飞鸟,小鱼是给她分配的导师,初次见面~ 午饭时间 Linux目录结构 resolv.conf文件 nameserver 唯一的必选关键字.表明DNS 服务器的IP 地址, ...

  6. Linux tmux 工具

    基础术语: sessions :会话,一个用户登录到主机,那么就建立了一个 session,如下图1,详细参考:https://my.oschina.net/u/158589/blog/360862t ...

  7. Linux必备工具Tmux

    之前介绍了Linux的Screen命令,今天介绍一个更为强大的终端工具Tmux. Tmux 是一个用于在一个终端窗口中运行多个终端会话的工具.它基本能替代nohup以及screen,甚至比它们更为强大 ...

  8. Linux常用命令之Tmux

    Tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD,采用BSD授权.使用它最直观的好处就是,通过一个终端登录远程主机并运行tmux后,在其中可以开启多个控制台而无需再“ ...

  9. Linux终端复用神器-Tmux使用梳理

    Tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD,采用BSD授权.使用它最直观的好处就是,通过一个终端登录远程主机并运行tmux后,在其中可以开启多个控制台而无需再“ ...

随机推荐

  1. ASP.Net Core 2.2 MVC入门到基本使用系列 (一)(转)

    本教程会对基本的.Net Core 进行一个大概的且不会太深入的讲解, 在您看完本系列之后, 能基本甚至熟练的使用.Net Core进行Web开发, 感受到.Net Core的魅力. 本教程知识点大体 ...

  2. 30.get和post的区别

    POST和GET的区别 Http定义了与服务器交互的不同方法,最基本的方法有4种,分别是GET,POST,PUT,DELETE.URL全称是资源描述符,我们可以这样认为:一个URL地址,它用于描述一个 ...

  3. IIS转发需要的模块

    1.Application Request Routing https://www.iis.net/downloads/microsoft/application-request-routing  2 ...

  4. Unity shader学习之半兰伯特光照模型

    半兰伯特光照模型,为Valve公司在开发游戏<半条命>时提出的一种技术,用于解决漫反射光无法到达区域无任凭明暗变化,丢失模型细节表现的问题. 其公式如下: Cdiffuse = Cligh ...

  5. JSP—连接池

    1:为什么要使用连接池? 解决频繁连接释放造成的资源浪费 2:配置好的数据库连接池也是以数据源DateSource的形式存, 连接池的实现类负责建立与数据库的连接. 3:使用连接池关闭资源的区别? 使 ...

  6. sitecore系统教程之内容编辑器

    内容编辑器   内容编辑器是一种编辑工具,可用于管理和编辑网站上的所有内容.它专为熟悉Sitecore及其包含的功能的经验丰富的内容作者而设计. 内容编辑器的外观和功能取决于用户的角色,本地安全设置以 ...

  7. Python 7 -- 文件存储数据

    上一节总结了一个基本web应用的代码,这一节主要讲用户访问的数据记录在log文件中,并显示在页面上. 这节步骤: 按以下目录建好相应的文件夹及内容 webapp|----vsearch4web.py ...

  8. django migrate无效的解决方法

    遇到一个很奇怪的问题 python manage.py makemigrations 的时候显示要创建两张表,但是执行 python manage.py migrate 的时候不能识别,也就是说失效了 ...

  9. 从网站上扒网页,保存为file文件格式

    保存下来的页面总是有部分特效缺失,可是文件包里已经有好几个js文件了. 例如想保存易迅的搜索页面,条件筛选栏的按钮全部失效了,按钮-更多.多选等 都没有反应,搜索结果的鼠标悬浮显示完整信息也没有了. ...

  10. Java Socket入门

    Java Socket底层采用TCP/IP协议通信,通信细节被封装,我们仅仅需要指定IP.端口,便能轻易地创建TCP或UDP连接,进行网络通信.数据的读写,可以使用我们熟悉的stream进行操作. T ...