News for hackers. Stuff that matters.
Re:My tmux setup by jlgreco on Friday November 15, 2013 @01:46PM (#6741300)
The only thing ctrl-A is used for by me besides screen (or rather, tmux after I remapped it), is incrementing a number in vim. Not really a big deal.
Re:My tmux setup by montecarl on Friday November 15, 2013 @03:19PM (#6741884)
Most people I know use it to go to the beginning of a line in programs that use readline, which includes the shell as well as most programming language interpreters.
Re:My tmux setup by jlgreco on Friday November 15, 2013 @03:44PM (#6742045)
You can set readline's editing mode to vi so that anything that uses readline will then have vi-style bindings. Very useful, particularly when combined with rlwrap for those few programs that don't have readline support.

Zsh doesn't use readline (it has it's own line editor) but it can be set to vi-style input too. (Actually, at least on my system, bash doesn't seem to be linked with libreadline.. I'm not sure if it is actually using readline or not)

Re:My tmux setup by pyre on Friday November 15, 2013 @04:40PM (#6742322)
Bash uses .inputrc which configures readline, so if it's not actually using libreadline, it's emulating it pretty well.
Re:My tmux setup by jlgreco on Friday November 15, 2013 @04:56PM (#6742421)
It looks like bash does use readline, though it's not dynamically linked with it (at least on my system). Kind of seems like bash and readline are intertwined more than I thought; the git repo for bash has a distribution of readline included in it.
Re:My tmux setup by gcr on Saturday November 16, 2013 @01:01PM (#6745719)
That makes sense to me. The shell is fundamental to the system, and is so heavily intertwined with readline that it is very sensitive to ABI/API changes. Consider: if you upgrade your readline without upgrading bash, or vice versa, you lose the ability to fix the problem even in single user mode. Having Bash control its own readline usage seems like the safest option, though conceptually a bit more complex.
Re:My tmux setup by saraid216 on Saturday November 16, 2013 @03:41AM (#6744183)
I started using screen before I started learning that facility. (At the time, I mostly used Windows, so the Home key was available.)

Of course, when I started developing on a Macbook, screen rapidly became problematic as there was no Home key and I started using Ctrl-A. For the moment, I'm developing locally so I don't need screen or tmux, but I'm working on off-loading to a VM and I'll be using tmux there for the purposes of maintaining my own sanity.

Re:My tmux setup by Nick_C on Saturday November 16, 2013 @10:24PM (#6747419)
I map Ctrl-q to beginning of line in .inputrc.

    Control-q: beginning-of-line
I know, I know, now we are remapping all over the place. But my muscle memory for Ctrl-a was too ingrained after years of screen usage.
Re:My tmux setup by fsckin on Friday November 15, 2013 @02:42PM (#6741646)
With a vimscript [0], ctrl-a can increment dates, times, roman numerals, ordinals, etc. Pretty damn handy along with ctrl-x to decrement.

[0] https://github.com/tpope/vim-speeddating

Re:My tmux setup by jlgreco on Friday November 15, 2013 @02:50PM (#6741715)
I actually do use that, but ctrl-a/ctrl-x is still something I rarely find myself using more than a few times a week. Still a great plugin though.