![]() So if you're not actually using screen/tmux from within (for example) a raw Linux terminal, but rather from a GUI-based terminal, then I recommend giving ctrl-s a try it's made zipping about in tmux and screen a lot more convenient for me. I'm sure some GUI terminal program somewhere still has that flow-control functionality enabled by default, but I haven't actually bumped into one the gui terminal programs I've tried all seem to completely ignore it by default, which makes that convenient key combination available for more productive uses. Of course, the reason that nothing is on ctrl-s is that in the terminal, it traditionally is used for flow control, dating back to the days before paging tools like more and less were common. nothing the vast majority of people use today is on ctrl-s! Doesn't override or add escaping-requirements to any other commonly-used terminal functionality.(I often do this using a local tmux with panes containing ssh sessions to remote servers, in which I run screen) Or hey, for running screen inside a tmux pane without needing to worry about escaping prefix characters to control the embedded screen instance. Frees up ctrl-a for emacs-style "back to beginning of line" or vim-style "increment number" operations.IPs) Create a nested tmux session on HOST-B and create windows within it. Create windows/panes and ssh to HOST-B, which is only accessible from HOST-A (say the pilot card with 10. Still close to ctrl-a (in fact, for most typers it will use the same two fingers they used for ctrl-a), so the muscle memory switch from ctrl-a to ctrl-s is trivial - for me, it became second nature within about an hour of first trying it. Connect to server HOST-A (say, a server hosts UDR virtual machines) which I already has at least one tmux session.# command charactersīindkey -d -k F2 process a # bound to F12Ĭaption always '%%n* %t%? '^M"Ī belated suggestion: ctrl-s. Revisiting this answer with a newer solution that allows for toggling the mode by hitting F12, and using a caption to indicate mode. I've found hitting a double tick is simple, and a good trade off for most screen operations. This will swap the escape to Ctrl-O for when I'm doing cut-and-paste operations. bindkey -d -k F1 escape ^O^O # bound to F11īindkey -d -k F2 escape \140\140 # bound to F12 For this reason I bindkey F11/ F12 to switch between my escape character. The issue with using backtick in a Unix environment is when attempting to cut-and-paste shell/Perl script code. It's very quick one handed gesture to (backtick)1, (backtick)2, (backtick)3 to swap between windows. This allows me to reserve screen 0 for what I consider persistent or reference windows. I rebind 's' to screen 1 so that new sessions are created from left to right on the keyboard starting at 1. The Ctrl-A complicates both Emacs and command line editing for me within Zsh, and I dislike Ctrl-O (2 hand operations for most screen actions). My default escape is set to \140\140, which is backtick.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |