News for hackers. Stuff that matters.
Re:Moving efficiently in the CLI by mooreds on Friday January 26, 2018 @05:08PM (#16243295)
I came here to post that, glad you beat me to it. Reaching for that control key? Ouch. Though I guess when you use vi keybindings, you are occasionally reaching for the escape key.

But, there is something to be said for meeting people where they are. If folks know the emacs keybindings, let them 'control' away!

Re:Moving efficiently in the CLI by SmirkingRevenge on Friday January 26, 2018 @06:01PM (#16243586)
Remap that caps lock key that you never use to ctrl. Your life is changed. You are welcome :)
Re:Moving efficiently in the CLI by Lio on Friday January 26, 2018 @05:22PM (#16243396)
As a dyed in the wool Vi user. I still want ctrl where I can reach it easily.

Ctrl-[ for escape and when in Insert mode, ctrl-h backspace; ctrl-w delete word; ctrl-u delete line; Ctrl-m return; ctrl-i tab, etc.

Re:Moving efficiently in the CLI by sergeykish on Friday January 26, 2018 @07:02PM (#16243938)
I once swapped Ctrl and Alt and never looked back. It feels so natural and it happens to match Symbolics Space-Cadet Keyboards layout too http://xahlee.info/kbd/space-cadet_keyboard.html

Advised by http://xahlee.info/kbd/linux_swap_modifier_keys.html

    ! -*- coding: utf-8 -*-
    ! 2013-02-04 swap Alt and Ctrl http://xahlee.info/

    !  xmodmap -pke | egrep '(Control|Super|Alt|Menu)'
    ! keycode  37 = Control_L NoSymbol Control_L
    ! keycode  64 = Alt_L Meta_L Alt_L Meta_L
    ! keycode 105 = Control_R NoSymbol Control_R
    ! keycode 108 = Alt_R Meta_R Alt_R Meta_R
    ! keycode 133 = Super_L NoSymbol Super_L
    ! keycode 134 = Super_R NoSymbol Super_R
    ! keycode 135 = Menu NoSymbol Menu
    ! keycode 147 = XF86MenuKB NoSymbol XF86MenuKB
    ! keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
    ! keycode 206 = NoSymbol Super_L NoSymbol Super_L

    clear control
    clear mod1
    keycode 37 = Alt_L Meta_L
    keycode 105 = Alt_R Meta_R
    keycode 64 = Control_L
    keycode 108 = Control_R
    add control = Control_L Control_R
    add mod1 = Alt_L Meta_L
Re:Moving efficiently in the CLI by SmirkingRevenge on Friday January 26, 2018 @06:13PM (#16243659)
Im a broken record in this thread right now... for goodness sake, remap capslock to ctrl!!
Re:Moving efficiently in the CLI by wyclif on Friday January 26, 2018 @06:51PM (#16243873)
That's the first thing I do when I start a new MBP.
Re:Moving efficiently in the CLI by Lio on Saturday January 27, 2018 @03:20AM (#16245344)
Yep, me too. The second thing I do is to remap the right alt key (used to be a numeric keypad 'enter' key back on my original MacBook Pro) to a second ctrl key.

I'm always confused by laptop designers who only include one ctrl key. How are we supposed to properly touch type modifiers otherwise?

Re:Moving efficiently in the CLI by henriquemaia on Saturday January 27, 2018 @04:05AM (#16245464)
> I'm always confused ...

Just stating the obvious: you’re not their target consumer.

Re:Moving efficiently in the CLI by Lio on Sunday January 28, 2018 @02:40AM (#16250304)
Maybe, there's probably some truth to that.

Apple do make it easy to remap the Alt key though and include a terminal and CLI commands by default so they must have some interest in business from people like me. ;)

(I would like to start a campaign to get the Mac Unix science page back again https://www.macobserver.com/tmo/article/apple-drops-science-...)

Re:Moving efficiently in the CLI by mooreds on Friday January 26, 2018 @05:39PM (#16243492)
different strokes for different folks. I did not know about those insert mode keystrokes. Thanks!
Re:Moving efficiently in the CLI by Lio on Saturday January 27, 2018 @03:15AM (#16245338)
Yeah, I have some problems with RSI in my right wrist (stop sniggering at the back).

I think it's mostly down to the way I twist to reach backspace rather than move my whole hand from the home row. Ctrl-h, Ctrl-w and Ctrl-m really help with that.

The only problem I have is that I don't know how to remap Ctr-m to return in X windows applications. I use Karabiner on a macOS and Gnome Tweak tool on Linux for the others.

It's somewhat frustrating to have different shortcuts in the terminal, where I spend most of my time and the browser where I spend most of the rest.

Edit: (If anyone can suggest a good way of mapping ctrl-m to return in Linux browsers I'd really appreciate it.)

Re:Moving efficiently in the CLI by SmirkingRevenge on Friday January 26, 2018 @06:10PM (#16243641)
Also ctrl-c does everything esc does in vim. When capslock is remapped to ctrl, its far easier and faster in most cases than reaching for esc.
Re:Moving efficiently in the CLI by zeptomu on Friday January 26, 2018 @10:46PM (#16244737)
Doesn't ctrl-c clear the whole line (maybe SIGINT related?) in vi-mode?
Re:Moving efficiently in the CLI by SmirkingRevenge on Saturday January 27, 2018 @12:08AM (#16244946)
Well, in vanilla vi - I'm not sure (quite frankly, anyone who stands by vanilla vi as a great way to edit text is fudging insane). In typical VIM installs, ctrl-c and esc are aliases of one another.
Re:Moving efficiently in the CLI by zeptomu on Saturday January 27, 2018 @12:36AM (#16245009)
Yeah, I meant vi(m)-mode in Bash/readline as mentioned in this discussion. When editing or correcting a command it may be inconvenient to destroy the whole line when switching to movement-mode (which does not happen, if it is not ctrl-c).
Re:Moving efficiently in the CLI by toyg on Friday January 26, 2018 @07:06PM (#16243954)
On the Japanese keyboard, Ctrl is where it should be: above Shift, replacing the useless and memetastic CapsLock.
Re:Moving efficiently in the CLI by u801e on Friday January 26, 2018 @07:03PM (#16243944)
You can always use ctrl-[ instead of esc.