未加星标

GNU Screen Hotkeys vs. Tmux Hotkeys

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

Years ago I had finally picked up on using a terminal multiplexer as part of my day to day workflow. I started with tmux having only used screen for one off server tasks that I wanted to persist across my Internet connection taking a shit.

Nothing wrong with tmux but I had made the mistake of starting off with tmuxinator which tacks on some pretty solid session management onto tmux . This was all well and good but because I scripted my windows to be exactly where / how I wanted them, I ended up being shielded from truly learning how to use tmux .

To be more specific, I never actually wrapped my head around how tmux handles windows and panes versus how screen does.

And then I went off the rails decided to simplify my life by abandoning my over-dependence to package managers and plugins . This eventually led me down the path of dumping tmux all together and moving to screen as my daily driver.

The major contributing factor, which you will probably find laughable, is that I really didn’t like the default prefix key with tmux , CTRL-b .

I know it can be reconfigured, but if my first order of business is to reconfigure tmux to use the screen prefix, CTRL-a , which I find to feel more natural, that it makes a whole lot of sense to just use screen instead.

Fast forward a couple of years and I’m still using screen but felt it may be time to re-evaluate things and give tmux a shot without all of the cruft of tmuxinator and actually digging into learning how to really use tmux .

It also didn’t hurt that a buddy of mine was asking me if I remembered how to do something in tmux the other day.

Which sadly, I didn’t.

With that, to get more formally reacquainted with tmux , I put together a little comparison chart of the hotkeys in screen and tmux . Keep in mind, this is not an exhaustive list, it’s the stuff that I regularly use.

There’s also a hard bias towards vi-mode and key combinations that keep me closer to the home row or require the least amount of keystrokes.

Action GNU Screen Tmux Start Named Session screen -S <name> tmux new -s <name> List Sessions screen -ls tmux ls Reconnect to Named Session screen -R <name> tmux attach -t <name> Detach Session CTRL-a d CTRL-b d Create New Window CTRL-a c CTRL-b c Rename Window CTRL-a A CTRL-b , Jump to Last Active Window CTRL-a CTRL-a CTRL-b l Jump to Window by Number CTRL-a <number> CTRL-b <number> Jump to Next Window CTRL-a n CTRL-b n Jump to Previous Window CTRL-a p CTRL-b p Show Window List CTRL-a " CTRL-b w Show Window Bar CTRL-a w n/a, on by default Kill Current Window CTRL-a k CTRL-b & Kill Session / All Windows CTRL-a \\ tmux kill-session Split Horizontally CTRL-a | CTRL-b " Split Vertically CTRL-a S CTRL-b % Make Split Wider CTRL-a :resize -h <number> CTRL-b ALT-← Make Split Thinner CTRL-a :resize -h <number> CTRL-b ALT-→ Make Split Taller CTRL-a :resize -v <number> CTRL-b ALT-↑ Make Split Shorter CTRL-a :resize -v <number> CTRL-b ALT-↓ Jump to Next Split CTRL-a TAB CTRL-b o Jump to Previous Split CTRL-a SHIFT TAB Navigate with CTRL-← → ↑ ↓ Close Current Split CTRL-a X CTRL-b x Close All but Current Split CTRL-a Q Couldn’t find this one Enter Copy / Scrollback Mode CTRL-a [ CTRL-b [ Toggle Copy Selection SPACE SPACE Jump Half Page Up CTRL-u CTRL-u Jump Half Page Down CTRL-d CTRL-d Jump Full Page Up CTRL-b CTRL-b CTRL-b Jump Full Page Down CTRL-f CTRL-f Jump To Top g g Jump To Bottom G G Move Cursor Left h h Move Cursor Down j j Move Cursor Up k k Move Cursor Right l l Copy ENTER ENTER Paste CTRL-a ] CTRL-b ] Exit Copy / Scrollback Mode q q

Real talk here, after sitting and messing with tmux a bit to work through these different hotkeys, I think I very well may hang up screen and plunge into tmux head first this new year!

Who the hell knows, maybe I’ll switch to nvim too ;)

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

代码区博客精选文章
分页:12
转载请注明
本文标题:GNU Screen Hotkeys vs. Tmux Hotkeys
本站链接:https://www.codesec.net/view/621130.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(155)