tmux

Multiple tmux prefix key combos?

℡╲_俬逩灬. 提交于 2019-12-03 09:34:29
I've got tmux setup just the way I like it, and my chosen key of prefix is `, because it's so quick and easy to use. Everything was gravy until I tried using tmux from my phone, which doesn't have a ` key. Is there anyway to additionally bind ^a to the prefix, so I can use BOTH combos at the same time? Starting with tmux 1.6, you can use the session option prefix2 to specify a second prefix key (e.g. in ~/.tmux.conf ): set-option -g prefix ` set-option -g prefix2 C-a Note: If you have any bindings or script that use the send-prefix , you can use its -2 option to send the key assigned to

Switch between sessions in tmux?

蹲街弑〆低调 提交于 2019-12-03 09:26:10
I'm relatively new to tmux and use it just for local development. In some tmux tutorials, a person will list out their tmux sessions in an enumerated list. There is yellow highlight typically. Does anyone know what I'm talking about and how to do it? Secondly, would you say this is best practice? I'm over here with 8 iTerm2 tabs open :( Here's a screenshot of what I'm looking for: C-b s found it! Alex's answer is awesome as well. Note C-b is my prefix, your prefix could be something else. You're looking for C-b ( and C-b ) . You can find this and many more wonderful tips on the tmux cheatsheet

BASH function with tmux send-keys

孤者浪人 提交于 2019-12-03 09:14:22
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 (treating the c-m as literal characters). How could I make it execute the send-keys argument as if I'd

Can I use double click to select and copy in tmux?

ε祈祈猫儿з 提交于 2019-12-03 05:46:48
问题 I am learning to use tmux, I found when I in a tmux window, double-click to select and copy function did not work any more. Can I use double-click to select and copy just as in iterm2? I have googled for some time, but did not find an short and clear answer to this. I have added setw -g mode-mouse on in the tmux configure file already. 回答1: I found a way to achieve that: hold the option key when double clicking. 回答2: Don't know about iterm2, but this can be made to work in tmux 3.0 or newer

emacs tramp over an unreliable connection

偶尔善良 提交于 2019-12-03 04:48:06
问题 I want to run R on a remote box under a local Emacs (I do not want to run Emacs on the remote box). I can run R on a remote host using TRAMP: (let ((default-directory "/user@remote:~")) (R)) and everything works fine except that when the connection to remote is lost, R dies. This is no good because this means that I have to re-load all the data into R after restarting it, which takes time. Is it possible to tell TRAMP to use a persistent terminal? (GNU Screen or tmux or Mosh or dtach) See

TMUX using HJKL to navigate panes

风流意气都作罢 提交于 2019-12-03 04:06:28
问题 Standard TMUX is set to use ctrl-b + [up, down, left, right] when navigating between panes. I would like to make it so that I can use ctrl-b (or the prefix of my choice) + [h,j,k,l]. I thought I had done this with the following vi key in my ~/.tmux.conf settings: set -g status-keys vi setw -g mode-keys vi Yet this didn't seem to change anything (at least not what I was looking for). How can I get this to work. And yes my .tmux.conf is working properly. I can provide more info if needed.

How do I start tmux with my current environment? [closed]

左心房为你撑大大i 提交于 2019-12-03 03:37:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Or at least the part of it, that makes sense. More specifically I have some environment variables, that have been exported by running a script, to create an adequate environment for the task at hand. When I run tmux these variables are nowhere to be seen, neither in the global or the session environment. Of

Tmux borders are drawn with dashed lines; how can I change them to continuous lines?

社会主义新天地 提交于 2019-12-03 03:34:19
问题 I'm using Mac OS X Lion, Terminal.app and Tmux version 1.6. I get a dashed line as a window border instead of a continuous line that I get when I ssh into a Debian virtual machine on the same computer using the same terminal. How can I change the dashed line to a continuous line? 回答1: I found the origin of the problem. It's the font. I was using Monaco and it displays vertical dashes in a way that the vertical pane separator is dashed. With Menlo however it's solid. 回答2: I had a similar

Clipboard failure in tmux + vim after upgrading to MacOS Sierra

拟墨画扇 提交于 2019-12-03 03:29:22
问题 Yesterday, I upgraded to MacOS Sierra and it broke my clipboard functionality in my tmux + neovim setup. Here is the behavior: I can use the standard ctrl+c, ctrl+p to copy/paste between system <-> vim I can yank/paste between two VIM instances when NOT in a tmux session I cannot yank/paste between two VIM instances when in a tmux session Whenever I use the clipboard in vim within a tmux session, I get the following vim error: clipboard: error: My .vimrc is huge, but here's what I think might

Home/End keys do not work in tmux

谁说我不能喝 提交于 2019-12-03 02:59:22
问题 I'm currently using tmux with xterm-256color $TERM variable. When in bash under tmux, pressing home/end would insert tilde characters (~). Outside of tmux the home/end keys work fine. Using cat and tput, I could see that there was a mismatch between the generated and expected sequences: $ cat -v # pressing home, then end ^[[1~^[[4~ $ tput khome | cat -v; echo ^[OH $ tput kend | cat -v; echo ^[OF To fix this, I decided to add the following to my .bashrc: if [[ -n "$TMUX" ]]; then bind '"\e[1~"