tmux

Is it possible to find tmux sockets currently in use?

爷,独闯天下 提交于 2019-12-21 06:58:32
问题 I am trying to get a list of tmux sockets that are currently being used but the best solution I've come up with so far is to check in /tmp/tmux* or TMPDIR. As far as I can tell tmux keeps these sockets around for some amount of time even if no current tmux session is using them. As such I was hoping there was something similar to tmux list-sessions, but for sockets, that would give me all the sockets that are currently being used. I couldn't seem to find one in the man page and if there was

Keyboard shortcuts in Tmux deactivated after using xclip

≯℡__Kan透↙ 提交于 2019-12-21 04:57:05
问题 I am using the following configuration in my .tmux.conf to copy text to-and fro from xclip bind C-c run "tmux save-buffer - | xclip -i -sel clipboard" bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" If I run C-prefix C-c for e.g, the text is pasted into another application but after that none of the tmux commands work in the tmux terminal (e.g. C-prefix [ to go into copy-mode etc.) What is wrong in my config? 回答1: According to https://wiki.archlinux.org/index

With $TERM='screen-256color' under tmux, HOME and END keys don't work. Why?

有些话、适合烂在心里 提交于 2019-12-20 09:49:28
问题 I have tmux set up with $TERM being set to screen-256color correctly. This works fine, and colours are set correctly, however it prevents me from sending HOME and END keys to the terminal, which are instead printed as F\n and H\n . I should add that home appears to work in irssi, but not vim. Home seems to send (According to Ctrl+v <HOME> ), ^[OH It may be worth adding that I am well aware of the ability to use ^ and $ to move to the start and end of the lines, however $ does not go to the

Vim goes whack with tmux

此生再无相见时 提交于 2019-12-20 09:06:45
问题 NERDTree goes whack in tmux session as in the picture. The same problem exists when windows are split. But now i am using powerline This time the Vim status goes whack(in the picture see the middle portion of the status line) in tmux. What is wrong? 回答1: I figured the solution after a long time, looking at a dotfile repo in github. It was just a single line of code that made the communication between Vim and Tmux smooth. In the .tmux.conf file, add this line set-window-option -g utf8 on 来源:

tmux 安装使用教程

流过昼夜 提交于 2019-12-20 00:47:48
tmux安装使用教程 tmux 下载安装 1. tar xvf tmux-2.6.tar.gz 2. ./configure && make && sudo make install 错误信息: error: libevent not found sudo apt-get install libevent-dev 错误信息: configure: error: “ curses not found” sudo apt-get install ncurses-dev 源码安装 (推荐使用) git clone https://github.com/tmux/tmux.git cd tmux sh autogen.sh ./configure && make sudo make install 配置 vim ~/.tmux.conf 基本操作信息查询 tmux list-keys 列出所有可以的快捷键和其运行的 tmux 命令 tmux list-commands 列出所有的 tmux 命令及其参数 tmux info 流出所有的 session, window, pane, 运行的进程号等。 窗口控制 先来看看在 tmux 之外如何进行控制session 会话: session是一个特定的终端组合。输入tmux就可以打开一个新的session tmux new -s session

How can I force `vagrant ssh` to do pseudo-tty allocation?

半城伤御伤魂 提交于 2019-12-19 10:25:40
问题 The first thing I do after vagrant ssh is usually attaching to a tmux session. I want to automate this, so I try: vagrant ssh -c "tmux attach" , but it fails and says "not a terminal". After some googling I find this article and know that I should force a pseudo-tty allocation before executing a screen-based program, and it can be done with the -t option of ssh . But I don't know how to use this option with vagrant ssh . 回答1: According to this documentation, you should try adding -- to the

Disable for good VIM's number increment that is mapped to Ctrl-a

喜夏-厌秋 提交于 2019-12-19 04:07:21
问题 I am using local and remote tmux sessions. To send commands to the local tmux I use Ctrl-a , and to the remote Ctrl-q . I have tried to disable the number increment that normally executes with Ctrl-a in vim, but it now triggers with Ctrl-q and i cannot find a way to disable it. BTW this happens only when a particular tmux window does not nest a remote one. Also, I think there still might be a combination of shortcuts in a remote tmux session that also triggers the increment. So is there a way

Starting a new tmux session and detaching it, all inside a shell script

喜你入骨 提交于 2019-12-18 12:05:07
问题 I am trying to create a new tmux session and execute the command 'vagrant up'. 'Vagrant up' takes more than 3 hours so I want to detach the session so that I can come back later and check the status of that command by attaching back to the same session. I followed the answer specified in the StackOverflow post to accomplish the same. I am getting the error no session found . Here is my code: $cat tmux_sh.sh #!/bin/bash echo "step 1" tmux new-session -d -s rtb123 'vagrant up' echo "step 2"

Starting a new tmux session and detaching it, all inside a shell script

让人想犯罪 __ 提交于 2019-12-18 12:04:20
问题 I am trying to create a new tmux session and execute the command 'vagrant up'. 'Vagrant up' takes more than 3 hours so I want to detach the session so that I can come back later and check the status of that command by attaching back to the same session. I followed the answer specified in the StackOverflow post to accomplish the same. I am getting the error no session found . Here is my code: $cat tmux_sh.sh #!/bin/bash echo "step 1" tmux new-session -d -s rtb123 'vagrant up' echo "step 2"

Bash scripts with tmux to launch a 4-paned window

妖精的绣舞 提交于 2019-12-18 10:06:24
问题 Can anyone help explain what's going on with tmux , bash , and exec ? I'm trying to set up a tmux session with a 4-pane window. Ideally, I want to run a command in 3 of the panes: e.g. a Ruby Thin server and a couple of Ruby daemons. This is what I have so far: ~/.bin/tmux-foo : #!/bin/sh tmux new-session -d -s foo 'exec pfoo "bundle exec thin start"' tmux rename-window 'Foo' tmux select-window -t foo:0 tmux split-window -h 'exec pfoo "bundle exec compass watch"' tmux split-window -v -t 0