tmux

tmux鼠标操作配置

若如初见. 提交于 2020-01-08 01:47:59
亲测真实有效的方法: 第一步:在~/下创建 .tmux.conf的配置文件,在里面输入 set-option -g mouse on 保存退出 第二步:在tmux界面 'ctrl b' + ':' 输入 source ~/.tmux.conf 来源: CSDN 作者: zhangyuexiang123 链接: https://blog.csdn.net/zhangyuexiang123/article/details/103879524

在tmux缓冲区中搜索

与世无争的帅哥 提交于 2020-01-07 13:57:13
复制模式搜索 要在tmux历史记录缓冲区中搜索当前窗口,请按 Ctrl- b [ 进入copy mode。 如果您正在使用emacs键绑定(默认设置),请按 Ctrl- s 然后输入要搜索的字符串,然后按 Enter 。按 n 再次搜索相同的字符串。按 Shift- n 进行反向搜索。按 Escape 两次退出copy mode。您可以使用 Ctrl- r 反向搜索。 请注意,由于tmux可以控制键盘copy mode,所以Ctrl- s不管stty ixon设置如何(我希望stty -ixon在Bash中启用向前搜索)都可以使用-。 如果您使用的是vi键绑定(Ctrl- b:set-window-option -g mode-keys vi),请按,/然后键入要搜索的字符串,然后按Enter。按n再次搜索相同的字符串。与emacs模式一样,按Shift- n进行反向搜索。按q两次退出copy mode。您可以使用?反向搜索。 查找窗口 如果要基于其中显示的内容(也包括窗口名称和标题但不包括历史记录)切换到窗口,(从打开多个窗口开始)请按Ctrl- b f然后键入要搜索的字符串,然后按Enter。如果找到该文本,您将切换到包含该文本的窗口。如果有多个窗口匹配,您将看到一个列表可供选择。 更多tmux的快捷键 https://gist.github.com/ryerh

How to bind vim (through tmux) to Cmd key

£可爱£侵袭症+ 提交于 2020-01-03 17:42:08
问题 I usually use macvim, and have a number of key bindings using my macs command key. I'm trying to switch over to tmux, but none of those bindings are working. Any tips on how to modify my .tmux.config or .vimrc to get those bindings back? 回答1: Do you, by any chance, use <D-> to emulate another editor's shortcuts? You can use the command key for mappings only in MacVim. There is no Vim-specific workaround. This is because this key is "intercepted" by Terminal.app (or iTerm.app) for its own use

How to bind vim (through tmux) to Cmd key

倖福魔咒の 提交于 2020-01-03 17:42:04
问题 I usually use macvim, and have a number of key bindings using my macs command key. I'm trying to switch over to tmux, but none of those bindings are working. Any tips on how to modify my .tmux.config or .vimrc to get those bindings back? 回答1: Do you, by any chance, use <D-> to emulate another editor's shortcuts? You can use the command key for mappings only in MacVim. There is no Vim-specific workaround. This is because this key is "intercepted" by Terminal.app (or iTerm.app) for its own use

Vim and Tmux rendering error

瘦欲@ 提交于 2020-01-01 12:09:17
问题 I have a problem when using Tmux and Vim. As you can see on the picture when I use nerdtree (or irssi, actually any terminal app), I have these kind of rendering problems. Every key I type modify the entire terminal rendering. It's only a graphical bug, but it prevents me from working properly. For example, on the screenshot I submitted, nerdtree is opened. The rendering issue comes mostly when the lines are too long (wrapping) or when I have to scroll (down or up). I haven't found a way to

Tmux: how do I bind function keys to commands?

折月煮酒 提交于 2020-01-01 10:10:04
问题 How do I bind a function key (e.g. F1, which generates ESC O P ) to a tmux command (e.g. "next window", ctrl-B n )? Context: ssh running on mac into tmux session on linux. I'm pressing fn-F1 on the mac keyboard to generate the ESC O P . 回答1: From the KEY BINDINGS section of man tmux : tmux allows a command to be bound to most keys, with or without a prefix key. When specifying keys, most represent themselves (for example ‘A’ to ‘Z’). Ctrl keys may be prefixed with ‘C-’ or ‘^’, and Alt (meta)

Tmux: how do I bind function keys to commands?

给你一囗甜甜゛ 提交于 2020-01-01 10:09:36
问题 How do I bind a function key (e.g. F1, which generates ESC O P ) to a tmux command (e.g. "next window", ctrl-B n )? Context: ssh running on mac into tmux session on linux. I'm pressing fn-F1 on the mac keyboard to generate the ESC O P . 回答1: From the KEY BINDINGS section of man tmux : tmux allows a command to be bound to most keys, with or without a prefix key. When specifying keys, most represent themselves (for example ‘A’ to ‘Z’). Ctrl keys may be prefixed with ‘C-’ or ‘^’, and Alt (meta)

How do I find out what escape sequence my terminal needs to send?

大城市里の小女人 提交于 2020-01-01 04:24:07
问题 I am using the terminal application on osX to connect to ubuntu (12.04 i think). I have the terminal at it's default setting of xerm-256. In this mode the terminal sends the sequence of \033OQ when F2 is pressed. There is no mapping however for Shift-F2 or Control-F2. There is also no sequences set for Shift-Left, Shift-Right, Control-Left, Control-Right, etc. I need some of these keys to operate features from time to time in various programs. Take for example byobu. Shift-F2 and Control-F2

How to change the starting directory of a tmux session?

对着背影说爱祢 提交于 2020-01-01 01:11:07
问题 The directory where you start a tmux session in will be the directory that all new windows will start at. My question is, how can you change this starting directory without closing your session? 回答1: The way to do this is to detach from the session ( ^b d with the default keybindings) and then specify a different directory when you reattach to it. When attaching to a session, use the -c flag to specify the working directory. Here's an example: $ tmux list-sessions tmuxwtfbbq: 3 windows

In tmux can I resize a pane to an absolute value

江枫思渺然 提交于 2019-12-31 07:57:14
问题 Is it possible to tell tmux to "resize a pane to 5 lines high"? I know I can do resize-pane -U 3 to move the dividing line, but sometimes when logging in with a different size monitor the size has changed by a lot of lines that I can't judge by eye. I'd like to be able to have one command that will change one window to exactly the right number of lines rather than faffing about with multiple resize-pane commands. 回答1: usage: resize-pane [-DLRUZ] [-x width] [-y height] [-t target-pane]