tmux

In tmux can I resize a pane to an absolute value

岁酱吖の 提交于 2019-12-31 07:57:05
问题 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]

Vim settings constantly getting reset

青春壹個敷衍的年華 提交于 2019-12-30 09:53:36
问题 I am using vim inside tmux. For some reason, my vim settings are getting constantly reset. --EDIT-- more detail: specifically, tabstop and autoindent are being set to default values, namely tabstop=8 and noautoindent . I don't think its something in my settings that is setting them to that, because when I type :so $MYVIMRC it resets to the proper values from my vimrc. I think vim is somehow "forgetting" my settings? I haven't been able to figure out exactly what is causing it, but it happens

tmux man-page search highlighting

别来无恙 提交于 2019-12-29 16:28:08
问题 When I search in, for example, man ls while in a tmux session, the search strings don't appear highlighted - the page jumps down so that the search string is on the top line of the buffer, as expected, but it's not highlighted. Doing the same thing in the same shell while not in a tmux session results in highlighted search strings. I have no idea where to start looking to solve this. Any hints are appreciated. 回答1: Based on Less Colors For Man Pages by Gen2ly , here is my man page and how to

Tmux使用

回眸只為那壹抹淺笑 提交于 2019-12-28 16:01:23
会话常用命令: tmux ls tmux attach -t <session name> , tmux switch -t <session name> , tmux detach, 快捷键 ctrl+b d 相当于命令detach,detach会话 reference: http://www.ruanyifeng.com/blog/2019/10/tmux.html 配置 创建.tmux.conf,可以更改快捷键设置(通常快捷键以ctrl+b开头)和鼠标使用。 config文件reference: https://blog.csdn.net/williamyuyuyu/article/details/79283374 config文件中鼠标操作设置reference: https://www.cnblogs.com/bamanzi/p/tmux-mouse-tips.html 鼠标配置出现错误unknow option:mode-mouse 使用以下语句替代: set-option -g mouse on 鼠标操作: 选取:shift 拷贝:shit+ctrl+c 粘帖:shit+ctrl+v 上翻页下翻页: pageup, pagedown 回溯浏览:鼠标滚轮 退出上下翻页和向上浏览:q 窗口操作: 根据.tmux.config的设置可定义自己的快捷键, 标准快捷键如下:

Linux下的终端挂起辅助工具tmux基本操作

时光总嘲笑我的痴心妄想 提交于 2019-12-25 23:37:35
简介 tmux(terminal multiplexer)是Linux下的工具,用于终端复用,功能全稳定性高。 在tmux模式下可以开启任意多个终端,在里面操作后可以挂起不影响终端内程序运行。甚至与服务器断开连接后,再次登录服务器后可以重新开启挂起的tmux终端,继续查看正在运行的程序。可以说是很好用的神器了。 命令 # 查看已有的终端列表 >> > tmux ls # 新建终端 >> > tmux # 新建并命名终端 >> > tmux new - s name # 打开最近一次打开的终端 >> > tmux a # 打开指定名字的终端 >> > tmux a - t name # 重命名终端 >> > tmux rename - t oldname newname # 删除上次打开的终端 >> > tmux kill - session # 删除指定名字的终端 >> > tmux kill - session - t name # 关闭除了指定名字以外的其他所有终端 >> > tmux kill - session - a - t s1 # 关闭所有终端 >> > tmux kill - server # 列出所有绑定的键,等同于prefix ? tmux list - key # 列出所有命令 tmux list - command tmux的快捷键以ctrl+B起始

Test unit results in color using console but not tmux unless --use-color is specified

▼魔方 西西 提交于 2019-12-25 05:35:29
问题 If I create a new Rails (3.2.12) app. Add the test-unit gem to my development, test group, and then scaffolded resource. When I run the tests from the Mac console.app, I get color output. bundle exec rake test When I create a tmux session (in console.app) for the app and run the exact same command. I don't get color output. However if I pass the "--use-color" switch, then I do get color output for the tests in tmux. bundle exec rake test TESTOPTS="--use-color" I'm setting 256 colors in my

tmux if-shell run-shell different outputs

泄露秘密 提交于 2019-12-24 20:09:56
问题 The is_vim command below works with the tmux if-shell command to properly detect if vim is open in the current pane, and if so then sends the key command below. But, it is not working with run-shell , and I'm not sure why. With run-shell , the if statement always seems to evaluate to false and it always called the tmux select-pane command below. # is_vim is directly from the setup guide for https://github.com/christoomey/vim-tmux-navigator is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ |

Cannot get delete key to work with tmux and OSX

爷,独闯天下 提交于 2019-12-24 12:35:16
问题 On OSX with tmux installed through homebrew I cannot seem to get my 'delete' key to work. I am using iterm2 and have my delete mapped to ^H. Without tmux the 'delete' key works fine. 回答1: I came across this and I found a solution for me. Tmux uses ^? for delete. stty was not sending ^? . I changed that using stty erase '^?' and then changed my preferences in iTerm2 for delete to send ^? https://github.com/tmux/tmux/issues/335 回答2: This might be some terminal emulation issue within your shell.

When using tmux nvm isn't being sourced

倖福魔咒の 提交于 2019-12-24 10:47:47
问题 I used brew to install nvm on macOS, then I used nvm to install node 8.9.1 and it works fine, until I load tmux, then I get the following messages: nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local" Run `npm config delete prefix` or `nvm use --delete-prefix v8.9.1 --silent` to unset it. After some troubleshooting I noticed that when I use tmux it is using a different npm. Not using tmux: ~ which npm /Users/mario/.nvm/versions/node/v8.9.1/bin/npm ~ npm

pasting a large amount of text into the clojure repl running in tmux results in errors and mixed up text

六眼飞鱼酱① 提交于 2019-12-24 09:57:59
问题 I'm having trouble pasting multiple function definitions into the clojure repl running in tmux. (the general case is pasting over a large amount of code) When I manually paste the following clojure definitions (as one paste operation) into the clojure repl not running in tmux it pastes over fine. But when pasting from tslime or directly into tmux running the clojure repl, some of the final defs get their text garbled and only some of the definitions get completed properly. (gets screwy around