tmux

Mapping arrow keys when running tmux

£可爱£侵袭症+ 提交于 2019-12-04 20:15:38
问题 These key mappings stop working in tmux. In my .vimrc , I have: nmap <Space> i map <C-Down> <C-w>j map <C-Up> <C-w>k map <C-Left> <C-w>h map <C-Right> <C-w>l When I run :map , I see: <C-Right> <C-W>l <C-Left> <C-W>h <C-Up> <C-W>k <C-Down> <C-W>j Yet when I hit control and an arrow key at the same time, it behaves as if no keybinding was set. 回答1: Vim knows that xterm -like terminals (identified by TERM starting with xterm , or a particular response to the t_RV sequence, if it is defined)

How to stream tmux pipe-pane via UDP

ぐ巨炮叔叔 提交于 2019-12-04 19:30:29
I'm trying to simultaneously save the output from a tmux pane to file and stream it using netcat. What works: tmux pipe-pane -o -t "server" "tee -a '/home/csgoserverp/test.txt'" echo -n "Hello World" | tee -a '/home/me/text.txt' | nc -4u -w1 0.0.0.0 9999 What does not work: tmux pipe-pane -o -t "server" "nc -4u -w1 0.0.0.0 9999" tmux pipe-pane -o -t "server" "tee -a '/home/me/test.txt' | nc -4u -w1 0.0.0.0 9999" Any help would be appreciated. I read somewhere that ncat is better than netcat and for reasons unknown using ncat works: tmux pipe-pane -t "server" "tee -a '/home/csgoserverp/test.txt

Convert current tmux session to configuration file

╄→гoц情女王★ 提交于 2019-12-04 17:22:25
I'm running a tmux session with 6 windows, about 14 panes in all. Is there a command way to save this session to a tmux configuration file? I'm not worried about running any of the programs, but hopefully I'll be able to keep the session name, window names, and pane folder locations. tmux by default doesn't provide any way to save/restore sessions/clients. But there are 3rd party tools to achieve it. For example, I wrote retmux to do exactly what you are asking for. https://github.com/sk1418/retmux What can be backed up/restored? sessions : with names, terminal-size windows : with name, order,

BASH function with tmux send-keys

﹥>﹥吖頭↗ 提交于 2019-12-04 13:33:06
问题 I'm having problems putting "send-keys" into a bash function. Here's a minimal example: function keys { tmux send-keys -t work:1 $* } tmux new-session -d -s work keys "pwd" c-m "ls -latr" c-m tmux attach-session -t work The keys argument here is exactly what I'd type on the command-line as an argument to tmux send-keys . It almost works, but strips spaces, so I see ls-latr all as one word. But if I put quotes around the $* in the function, it just outputs the entire keys argument on one line

How does Vim guess background color on xterm?

为君一笑 提交于 2019-12-04 13:00:31
Vim has the ability to correctly guess the background color of an Xterm in order to set its internal option bg to either dark or white according to the terminal's one. Vim is able to do that correctly only when TERM is set to either xterm {, -color , -256color } or linux but no others like tmux or screen . How does Vim to guess that? I've found that most people forces setting up the background option to either dark or light in their .vimrc file; but I'd like a way to guess the same way Vim does, independently of the terminal being xterm , tmux , screen . osgx The default setting is defined

Tmux: How to configure tmux to display the current working directory of a pane on the status bar?

走远了吗. 提交于 2019-12-04 10:19:05
问题 I am new to tmux and I am trying to edit my tmux.conf file to have the left side of the status bar reflect: [SessionName] [CurrentPane] [CurrentWorkingDirectory] I am able to display the SessionName and CurrentPane . However I can't get to display the CurrentWorkingDirectory . I've tried several #(shell command) options: #(tmux select-pane -t :.#P; pwd) : But this prints some other $PWD variable which does NOT reflect the current directory of the bash session in the current pane. #(tmux

Alert in tmux when a process completes

岁酱吖の 提交于 2019-12-04 09:08:28
问题 Can I set tmux to trigger an alert in a non-active window when a process completes? For example: I start a long build process. I would like to be notified when it completes, not each time it prints a status. 回答1: I'm surprised this answer hasn't been given yet: You can use the tmux window setting visual-bell for this. With bell-action you can then configure whether you want to see bells for the current window only, or for non-current window only (other). Personally I prefer the second, as you

Vim and Tmux rendering error

只谈情不闲聊 提交于 2019-12-04 09:04:04
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 solve it. Does anybody has this problem too? I really don't know how to solve this. Many thanks!

Tmux window title keeps renaming

大城市里の小女人 提交于 2019-12-04 09:01:33
问题 Suddenly, both my screen/tmux started changing my windows' names after every command. They keep changing the name to the value of $PROMPT_COMMAND on every single action on the terminal, even after manually renaming them (by Ctrl+A A on screen or Ctrl+B on tmux). On tmux I already tried to change the tmux.conf settings to disable window auto renaming off, but seems that it was ignored. I am using bash without the standard /etc/bashrc configuration file. My distro is Fedora 18. 回答1: Check

Howto go to beginning of line in tmux after remapping prefix to CTRL+A?

本秂侑毒 提交于 2019-12-04 07:48:02
问题 following the suggestion in this Archlinux wiki, in the page about tmux I remapped the command key prefix to C-a , to mimic GNU screen and to have something easier on the keyboard than C-b . So my .tmux.conf became this: set -g default-terminal "screen-256color" unbind C-b set -g prefix C-a set-window-option -g mode-keys vi bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R However, while in screen it was possible to use C-a a to jump to the beginning of