Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Nicholas Marriott
On Thu, Apr 29, 2010 at 09:12:07PM +0100, Nicholas Marriott wrote:
> On Thu, Apr 29, 2010 at 01:04:55PM -0700, Micah Cowan wrote:
> > Nicholas Marriott wrote:
> > > And it is surprising the amount of variation: I have seen others who use
> > > `, or function keys, quite a few seem to go for C-x or C-s, and some
> > > even for C-z.
> > 
> > Using C-s sounds like asking for trouble. :)
> > 
> > > So (and I know you didn't suggest this but some people might be
> > > wondering :-), the tmux prefix key is C-b and it is staying C-b unless
> > > there is a clear consensus that it should change, and what it should
> > > change to.
> > 
> > I doubt there ever will be. C-a makes a poor universal choice (despite
> > screen's precedence, and my personal preference) for the start-of-line
> > thing; ` may make a poor choice for people who write much Perl or shell,
> > or use it with the Compose key to type grave accents (?) or whatnot. It
> > seems to me that there are no good choices, only choices that vary in
> > how poor they are (C-m or C-i are obviously poor choices, and
> > function-keys and C-s can lead to problems that C-a and C-b won't). So
> > might as well keep on doing what we've been doing: choose an arbitrary
> > prefix, but refer to it generically as  wherever possible, and
> > let people change it to suit their needs.
> > 
> > > The same applies to default colours... many people want colours by
> > > default and many do not, no consensus means it stays what I originally
> > > chose, which is a coloured tmux by default. And the same for the status
> > > line, there is no clear opinion on whether on or off is better by
> > > default, so on it stays on :-).
> > 
> > Yeah. Personally, I always liked having such a visual reminder that I'm
> > "in screen/tmux"; in screen, one of the first things I tended to do in
> > screen was to turn the status bar on, even if I didn't intend to use the
> > information it provided. Though altering one's prompt based on STY or
> > TMUX is another solution, and one that needn't take space (but I tend to
> > have several windows open, so I do usually need the window-list anyway).
> 
> Yeah, me to, although I change my prompt very slightly as well (yellow $
> instead of white).
> 
> > 
> > > For the record, I use C-a for my primary tmux sessions but I leave it at
> > > C-b for transient ones (eg when I start one up on a different box just
> > > for a build).
> > 
> > Do you use Home and End when you're using Emacs, then?
> 
> No, I always just hit C-a twice inside and outside tmux.

I use emacs for at least 8 hours every day so one of the things that
helps to make tmux very productive for me is that copy mode behaves a
lot like emacs (at least for basic functions), so it is very fast and
natural for me to use it... this is why I make such a fuss about being
changing the emacs keys :-).

> 
> > > The actual reason I originally chose C-b was because the first prototype
> > > versions of tmux were written and tested inside screen, and C-b didn't
> > > interfere with screen's C-a prefix.
> > > 
> > > As an aside, you can bind multiple prefix keys, so if you wanted you
> > > could bind a function key and another key as a backup.
> > 
> > Good point. I don't believe screen allows this.
> > 
> > 
> > -- 
> > Micah J. Cowan
> > http://micah.cowan.name/
> 
> --
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Nicholas Marriott
On Thu, Apr 29, 2010 at 01:04:55PM -0700, Micah Cowan wrote:
> Nicholas Marriott wrote:
> > And it is surprising the amount of variation: I have seen others who use
> > `, or function keys, quite a few seem to go for C-x or C-s, and some
> > even for C-z.
> 
> Using C-s sounds like asking for trouble. :)
> 
> > So (and I know you didn't suggest this but some people might be
> > wondering :-), the tmux prefix key is C-b and it is staying C-b unless
> > there is a clear consensus that it should change, and what it should
> > change to.
> 
> I doubt there ever will be. C-a makes a poor universal choice (despite
> screen's precedence, and my personal preference) for the start-of-line
> thing; ` may make a poor choice for people who write much Perl or shell,
> or use it with the Compose key to type grave accents (?) or whatnot. It
> seems to me that there are no good choices, only choices that vary in
> how poor they are (C-m or C-i are obviously poor choices, and
> function-keys and C-s can lead to problems that C-a and C-b won't). So
> might as well keep on doing what we've been doing: choose an arbitrary
> prefix, but refer to it generically as  wherever possible, and
> let people change it to suit their needs.
> 
> > The same applies to default colours... many people want colours by
> > default and many do not, no consensus means it stays what I originally
> > chose, which is a coloured tmux by default. And the same for the status
> > line, there is no clear opinion on whether on or off is better by
> > default, so on it stays on :-).
> 
> Yeah. Personally, I always liked having such a visual reminder that I'm
> "in screen/tmux"; in screen, one of the first things I tended to do in
> screen was to turn the status bar on, even if I didn't intend to use the
> information it provided. Though altering one's prompt based on STY or
> TMUX is another solution, and one that needn't take space (but I tend to
> have several windows open, so I do usually need the window-list anyway).

Yeah, me to, although I change my prompt very slightly as well (yellow $
instead of white).

> 
> > For the record, I use C-a for my primary tmux sessions but I leave it at
> > C-b for transient ones (eg when I start one up on a different box just
> > for a build).
> 
> Do you use Home and End when you're using Emacs, then?

No, I always just hit C-a twice inside and outside tmux.

> > The actual reason I originally chose C-b was because the first prototype
> > versions of tmux were written and tested inside screen, and C-b didn't
> > interfere with screen's C-a prefix.
> > 
> > As an aside, you can bind multiple prefix keys, so if you wanted you
> > could bind a function key and another key as a backup.
> 
> Good point. I don't believe screen allows this.
> 
> 
> -- 
> Micah J. Cowan
> http://micah.cowan.name/

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Micah Cowan
Nicholas Marriott wrote:
> And it is surprising the amount of variation: I have seen others who use
> `, or function keys, quite a few seem to go for C-x or C-s, and some
> even for C-z.

Using C-s sounds like asking for trouble. :)

> So (and I know you didn't suggest this but some people might be
> wondering :-), the tmux prefix key is C-b and it is staying C-b unless
> there is a clear consensus that it should change, and what it should
> change to.

I doubt there ever will be. C-a makes a poor universal choice (despite
screen's precedence, and my personal preference) for the start-of-line
thing; ` may make a poor choice for people who write much Perl or shell,
or use it with the Compose key to type grave accents (à) or whatnot. It
seems to me that there are no good choices, only choices that vary in
how poor they are (C-m or C-i are obviously poor choices, and
function-keys and C-s can lead to problems that C-a and C-b won't). So
might as well keep on doing what we've been doing: choose an arbitrary
prefix, but refer to it generically as  wherever possible, and
let people change it to suit their needs.

> The same applies to default colours... many people want colours by
> default and many do not, no consensus means it stays what I originally
> chose, which is a coloured tmux by default. And the same for the status
> line, there is no clear opinion on whether on or off is better by
> default, so on it stays on :-).

Yeah. Personally, I always liked having such a visual reminder that I'm
"in screen/tmux"; in screen, one of the first things I tended to do in
screen was to turn the status bar on, even if I didn't intend to use the
information it provided. Though altering one's prompt based on STY or
TMUX is another solution, and one that needn't take space (but I tend to
have several windows open, so I do usually need the window-list anyway).

> For the record, I use C-a for my primary tmux sessions but I leave it at
> C-b for transient ones (eg when I start one up on a different box just
> for a build).

Do you use Home and End when you're using Emacs, then?

> The actual reason I originally chose C-b was because the first prototype
> versions of tmux were written and tested inside screen, and C-b didn't
> interfere with screen's C-a prefix.
> 
> As an aside, you can bind multiple prefix keys, so if you wanted you
> could bind a function key and another key as a backup.

Good point. I don't believe screen allows this.


-- 
Micah J. Cowan
http://micah.cowan.name/

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Nicholas Marriott
I know you aren't advocating a change but I might as well hijack this
thread a little, since I have found it quite interesting seeing what
prefixes people use:

What has become clear over the last few of years is that there is
absolutely no consensus about the best prefix key.

Quite a few people have asked why tmux doesn't use C-a, because that is
what screen uses.

But probably an equal number of people have said that they like C-b, or
mooted tmux for using C-b, because it doesn't interfere with C-a for
start-of-line in emacs or the shell.

And it is surprising the amount of variation: I have seen others who use
`, or function keys, quite a few seem to go for C-x or C-s, and some
even for C-z.

So (and I know you didn't suggest this but some people might be
wondering :-), the tmux prefix key is C-b and it is staying C-b unless
there is a clear consensus that it should change, and what it should
change to.

The same applies to default colours... many people want colours by
default and many do not, no consensus means it stays what I originally
chose, which is a coloured tmux by default. And the same for the status
line, there is no clear opinion on whether on or off is better by
default, so on it stays on :-).

For the record, I use C-a for my primary tmux sessions but I leave it at
C-b for transient ones (eg when I start one up on a different box just
for a build).

The actual reason I originally chose C-b was because the first prototype
versions of tmux were written and tested inside screen, and C-b didn't
interfere with screen's C-a prefix.

As an aside, you can bind multiple prefix keys, so if you wanted you
could bind a function key and another key as a backup.


On Thu, Apr 29, 2010 at 12:19:50PM -0700, Micah Cowan wrote:
> Martial Boniou wrote:
> > I presume you're ok with C-b. If not, what other prefix can you advice?
> 
> No, personally I hate C-b: too much finger-stretching for such a
> commonly-used function. I use C-a, which I became accustomed to in
> screen. This works fine for me, since I use vi-mode in my shell (and vim
> as my editor, or sometimes emacs with viper-mode). Some folks have been
> known to use ` (not C-`) as their escape in screen, so I suppose that
> works, too. Still others use function-keys, I think, but that makes me a
> little nervous, since the function-keys are so very terminal-dependent,
> and easy to get screwed up.
> 
> -- 
> Micah J. Cowan
> http://micah.cowan.name/
> 
> --
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Micah Cowan
Martial Boniou wrote:
> I presume you're ok with C-b. If not, what other prefix can you advice?

No, personally I hate C-b: too much finger-stretching for such a
commonly-used function. I use C-a, which I became accustomed to in
screen. This works fine for me, since I use vi-mode in my shell (and vim
as my editor, or sometimes emacs with viper-mode). Some folks have been
known to use ` (not C-`) as their escape in screen, so I suppose that
works, too. Still others use function-keys, I think, but that makes me a
little nervous, since the function-keys are so very terminal-dependent,
and easy to get screwed up.

-- 
Micah J. Cowan
http://micah.cowan.name/

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Martial Boniou
At Thu, 29 Apr 2010 11:20:45 -0700,
Micah Cowan  wrote:
> 
> Nicholas Marriott wrote:
> > C-` generates the same sequence as C-space, bind that.
> 
> And as C-@ (which is the canonical form, I think)
Ah, ok!

> Note that, if you ever use Emacs, C-space (or C-@ or C-`, however you
> invoke it) is a frequently-needed keybinding.
Yes. Thanks to recall it. I may have problems, yes. But, as a kind of 
cyber-pervert, I exclusively use emacs with Vi emulation (viper mode and 
vimpulse, you know, d$3jp$J so no mark) plus I often use the gtk for the 
jpg/png support.

I presume you're ok with C-b. If not, what other prefix can you advice?

> -- 
> Micah J. Cowan
> http://micah.cowan.name/

Cheers,

--
Martial

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Micah Cowan
Nicholas Marriott wrote:
> C-` generates the same sequence as C-space, bind that.

And as C-@ (which is the canonical form, I think)

Note that, if you ever use Emacs, C-space (or C-@ or C-`, however you
invoke it) is a frequently-needed keybinding.

-- 
Micah J. Cowan
http://micah.cowan.name/

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Martial Boniou
Thanks a lot! It works. (not the first time, I tried b/c I got the old 1.1 
version through a MacPorts install).
I complete with the line:
bind-key C-space last-window
to get most of my screen behavior back.

Good bye screen.

Cheers,

--
Martial

At Thu, 29 Apr 2010 15:10:36 +0100,
Nicholas Marriott  wrote:
> 
> C-` generates the same sequence as C-space, bind that.
> 
> 
> On Thu, Apr 29, 2010 at 03:57:55PM +0200, Martial Boniou wrote:
> > Hi,
> > 
> > I often use gnu screen and I would like to switch to tmux. I generally 
> > remap my prefix to C-backquote (escape ^`` in my .screenrc). Is there a way 
> > to do this on tmux? I am an old school typist and I easily use C-a, C-b, 
> > C-h, C-w... during my xterm sessions so having the opportunities to type 
> > some "weird" key combinations may help me not to unbind a useful Control 
> > sequence. (for instance, I will map to M-A or something like that).
> > I may write a short awful C hack in the tmux sources too but I don't want 
> > to dive in the code yet.
> > 
> > Regards,
> > 
> > --
> > Martial
> > 
> > --
> > ___
> > tmux-users mailing list
> > tmux-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tmux-users

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Nicholas Marriott
C-` generates the same sequence as C-space, bind that.


On Thu, Apr 29, 2010 at 03:57:55PM +0200, Martial Boniou wrote:
> Hi,
> 
> I often use gnu screen and I would like to switch to tmux. I generally remap 
> my prefix to C-backquote (escape ^`` in my .screenrc). Is there a way to do 
> this on tmux? I am an old school typist and I easily use C-a, C-b, C-h, 
> C-w... during my xterm sessions so having the opportunities to type some 
> "weird" key combinations may help me not to unbind a useful Control sequence. 
> (for instance, I will map to M-A or something like that).
> I may write a short awful C hack in the tmux sources too but I don't want to 
> dive in the code yet.
> 
> Regards,
> 
> --
> Martial
> 
> --
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Additional key bindings support (C-Backtick ...)

2010-04-29 Thread Martial Boniou
Hi,

I often use gnu screen and I would like to switch to tmux. I generally remap my 
prefix to C-backquote (escape ^`` in my .screenrc). Is there a way to do this 
on tmux? I am an old school typist and I easily use C-a, C-b, C-h, C-w... 
during my xterm sessions so having the opportunities to type some "weird" key 
combinations may help me not to unbind a useful Control sequence. (for 
instance, I will map to M-A or something like that).
I may write a short awful C hack in the tmux sources too but I don't want to 
dive in the code yet.

Regards,

--
Martial

--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users