tmux

【Linux】tmux

拈花ヽ惹草 提交于 2019-11-29 15:03:25
【Linux】tmux 准备工作 会话操作 窗格工作 reference 准备工作 安装 # Ubuntu $ sudo apt - get install tmux # Mac $ brew install tmux 启动 tmux 退出 ctrl+d 或者输入 exit 会话操作 新建会话 tmux new - s < session - name > # 默认第一个编号是0,第二个是1,以此类推 分离会话,退出当前 Tmux 窗口,但是会话和里面的进程仍然在后台运行 ctrl+b d 或者输入 tmux detach 窗格工作 # 划分上下两个窗格 tmux split - window # 划分左右两个窗格 tmux split - window - h # 当前窗格上移 tmux swap - pane - U # 当前窗格下移 tmux swap - pane - D 来源: CSDN 作者: Hanawh 链接: https://blog.csdn.net/qq_36530992/article/details/103245134

How do you detach a remote screen session in byobu (tmux)?

只谈情不闲聊 提交于 2019-11-29 06:22:53
问题 I am currently in a byobu-tmux session and am ssh'ed into a screen session. How do I detach the remote screen session without detaching byobu-tmux session? Some things to note, I can't run byobu-config because I'm on osx and don't have python-newt (w/ snack) installed. And, I've run byobu-ctrl-a in Emacs mode, but that doesn't seem to allow me to ctrl-a d out of the remote screen session. 回答1: You should be able to double-escape with Ctrl - a . To send a detach message to the inner byobu

Tips for TMUX

大城市里の小女人 提交于 2019-11-28 18:56:15
常用命令 tmux ls # 显示后台session列表 tmux new -t [name] # 新建session tmux a -t [name] # 进入session tmux kill-session -t [name] # 关闭session prefix + $ # 重命名session prefix + s # 从当前session查看所有session prefix + d # 断开当前session连接 prefix + c # 新建window prefix + & # 关闭当前window prefix + , # 重命名当前window prefix + " # 当前pane下侧新建pane prefix + % # 当前pane右侧新建pane prefix + x # 关闭当前pane prefix + 方向键 # 根据方向键切换pane predix + z # 进入或退出当前pane最大化 基本概念 tmux采用C/S模型构建,输入tmux命令就相当于开启了一个服务器,此时默认将新建一个会话,然后会话中默认新建一个窗口,窗口中默认新建一个面板。会话、窗口、面板之间的联系如下: 一个tmux session(会话)可以包含多个window(窗口),窗口默认充满会话界面,因此这些窗口中可以运行相关性不大的任务。 一个window又可以包含多个pane

Configuring solarized colorscheme in gnome terminal, tmux and vim

扶醉桌前 提交于 2019-11-28 17:50:25
问题 I'm struggling to make the Solarized colorscheme correctly working on an Ubuntu 13.10 machine inside Vim inside tmux inside the gnome-terminal. I've started configuring gnome-terminal using the script on this repository and it displays the colors correctly. The same goes if I run Vim (with the official Solarized colorscheme) inside the terminal, without tmux. Then I tried to configure tmux using this. It happens that when I run Vim the syntax highlight for php or javascript code is wrong or,

Change background color of active or inactive pane in Tmux

ぃ、小莉子 提交于 2019-11-28 17:02:30
问题 Are there any options to control the background color of the active or inactive panes in Tmux? 回答1: It seems that tmux-2.1 (released 18 October 2015) now allows the colours of individual panes to be specified. From the changelog: * 'select-pane' now understands '-P' to set window/pane background colours. e.g. [from the manual] to change pane 1's foreground (text) to blue and background to red use: select-pane -t:.1 -P 'fg=blue,bg=red' To mimic iTerm colour scheme: To answer the original

vim in tmux background color changes when paging

倾然丶 夕夏残阳落幕 提交于 2019-11-28 16:27:35
问题 I am using vim in 256 color mode on Solaris (connected via Putty on Windows). Everything looks great and works fine outside of tmux, but within tmux the background color changes periodically when paging/scrolling through a file. Here is how it's supposed to look: Here is how it appears after paging around a bit: Thanks! 回答1: As explained here, disable Background Color Erase (BCE) by clearing the t_ut terminal option (run :set t_ut= in Vim and then press Control + L to refresh the terminal's

Ugrade tmux from 1.8 to 1.9 on Ubuntu 14.04

半世苍凉 提交于 2019-11-28 16:03:55
I was just adding tmux plugins to my .tmux.conf file to find out that one of the plugins (tmux-copycat I think) requires tmux 1.9. When I start tmux I get the message `Error: Tmux version unsupported. Please install tmux version 1.9 or greater!". So, what is the best way to upgrade tmux 1.8 to 1.9 on Ubuntu 14.04? Update : due to new tmux version and changes in package repository, this answer is updated to show how to install tmux 2.0 (which is better, no reason to use 1.9 anymore). Here are the steps to update "blank" ubuntu - version 14.04 only (see below for other ubuntu versions): sudo apt

Using Emacs server and emacsclient on other machines as other users

天大地大妈咪最大 提交于 2019-11-28 15:39:17
I know that after I call (start-server) inside an existing Emacs session I can then use emacsclient -c (on the same computer) to create new frames that connect into that server, so that each new frame created by emacsclient has access to the same set of shared state (e.g. buffers). Most of the documentation I've found focuses on the "give me fast access to my local Emacs" use case, and so there are two things that I haven't seen any details of yet: Can emacsclient -c access Emacs servers started by other users, or is it hard-wired to detect only sessions started by my own user? Does Emacs

How to copy and paste between different tmux panes running vim instances

痞子三分冷 提交于 2019-11-28 15:29:57
问题 Example: copy in one tmux pane (via vim), then switch to another pane (running another vim instance) and paste using the vim paste command. I know this can be done via tmux (using prefix+]) but it would be really handy if I can copy and paste using vim bindings since i'm just switching between different panes running vim. Any ideas? 回答1: Sorry, I'm trying to convince you to use vim built-in features. To make the copy/paste easy, you can open files in another Tabpages: :tabe /path/to/another

How can I clear scrollback buffer in Tmux?

你说的曾经没有我的故事 提交于 2019-11-28 15:08:38
FYI, I am using Tmux through the Mac OS X Terminal app. This same question has been plaguing me for quite some time. Here's the best I've come up with. Put this into your .tmux.conf file: bind -n C-k clear-history This binds ctrl-k to the tmux clear-history command. The -n after bind makes it so you don't have to issue the tmux command prefix (ctrl-b by default). I use bash, so ctrl-l already does the equivalent of typing "clear" at the command line. With these two keys I get a nice ctrl-l, ctrl-k combo, which moves all the scroll buffer off the screen (the "clear") and then deletes all that