1. 20
  1. 9

    Gonna bookmark this for a rainy day when I feel like spending a few hours customizing config files instead of household chores.

    1. 3

      One suggestion is to rebind the default prefix (C-b) to C-z instead: while C-b moves backwards one character in the default shell config (and hence I use it all the time), C-z backgrounds a job, which I do rarely enough that typing C-z z to do so is perfectly fine.

      1. 5

        I background+foreground jobs pretty frequently. So I need C-z to be free.

        Personally I set my prefix to C-a.
        I think it’s usually used to go to the start of the input line in most shells by default, but I set -o vi in my shell so that doesn’t apply to me.

        A friend of mine sets their prefix to a backtick. Which I thought was interesting, but I like to use backticks now and then…

        1. 7

          C-a is a super common choice, as it’s the same prefix that screen uses by default. The screen folks, in turn, either had the right idea or it was a pretty lucky guess: C-a takes you to the beginning of the line, which is not needed too frequently in a shell.

          On the other hand it’s the “go to the beginning of the line” in Emacs, too so, uhh, I use C-o for tmux. I suppose it might be a good choice for the unenlightened vim users out there :-).

          Another prefix binding that I found to be pretty good is C-t. Normally, it swaps two characters before the cursor, a pretty neat thing to have over really slow connections but also frequently unused. Back when I used Ratpoison, I used it as the Ratpoison prefix key.

          I think C-i (normally that’s a Tab) and C-v (escape the next character) are also pretty good, particularly the former one, since Tab is easily reachable from the home row and available on pretty much any keyboard not from outer space.

          I’ve no idea why I spent so much time thinking about these things, really. Yep, I’m really fun at parties!

          1. 2

            I use C-o for tmux

            Yeah, I’ve used C-o for screen since I guess the mid-90s because I couldn’t deal with C-a being snarfed, possibly because I was using a lot of terminal programs which used emacs keybindings at the time… Now I’m slowly moving over to tmux and keeping the C-o even though I rarely use anything terminal-based these days.

            1. 1

              C-o is pretty important in vim actually. Personally I use M-t, which doesn’t conflict with any vim bindings (vim doesn’t use any alt/meta bindings by default) or any of my i3 bindings (I do use alt for my i3 super key)

              1. 1

                Oh, I had no idea, the Church of Emacs does not let us meddle with the vim simpletons, nor dirty our hands with their sub-par editor :-P. I just googled it and, uh, yeah, it seems important, I stand corrected!

            2. 2

              Personally I set my prefix to C-a. I think it’s usually used to go to the start of the input line in most shells by default …

              And in Emacs; I use it multiple times an hour, so unfortunately that is out for me.

              I think that I have experimented with backtick in screen, after I started using Emacs. I have a vague memory of problems when copy-pasting lines of shell which led me to use C-z instead.

              1. 2

                I’ve used C-a in screen for ages and carried it over tmux. Hitting. C-a a to get to the start of the line is so ingrained now that it trips me up when I’m not using tmux.

            3. 2

              I just use C-a, primarily because I moved to tmux from using screen, which uses that binding for the prefix.

              1. 1

                Yeah I found C-a much better than C-b, much less of a stretch, but eventually I started getting firearm pain in my left arm from all the pinky action. I’ve moved to M-t, most often using right hand for alt and left hand for t.

              2. 1

                C-f

                1. 1

                  Unfortunately that is forward-char🙂

                  1. 1

                    the lesser of all evil

                2. 1

                  I use C-q. It’s extremely easy for me to hit the keys together, since I remap capslock to be control, and is quite comfortable.

                  This leads to fun when I accidentally killed my other applications, but at this point it’s ingrained so I don’t mess up.

                  1. 1

                    Interesting! I might give that a shot. I do use C-q to quote characters, but not that often, only once or twice every couple of days.