Earlier quoted context omitted.
Who has time to move all of the way over to the arrow keys, tap a few times and then find the little tab on the J again? I have arrows behind a second layer on my keyboard with vim mapping, and I don't think I could give that up. If you spend all day in front of a keyboard you might as well learn to be efficient with it.
> I have arrows behind a second layer on my keyboard with vim mapping Same here: second layer reachable from the hands' home position on the keyboard. Left thumb for the modifier + ijkl in my case (I like ijkl for it mimics an actual arrows key cluster). It works everywhere: xterm / command line, Emacs, any editor / IDE really, any dropdown menu... It's the way.
Keyboard shortcuts for GNU Readline
81–90 of 174 posts
Re: Keyboard shortcuts for GNU Readline
#82Earlier quoted context omitted.
ime, most programs using readline parse ~/.inputrc. set editing-mode vi set keymap vi-command That does the trick for me in python shell, psql, etc. First thing I do on any fresh unix box is setting above, and echo "set -o vi" >> ~/.bash_profile.
For programs which use libedit, you can also setup vi mode. bind -v
Re: Keyboard shortcuts for GNU Readline
#83Although GNU readline maintains a kill ring (clipboard), which works much like Emacs’s kill ring, it’s not shared with your system’s clipboard, nor any other instances of GNU readline. It is, in effect, local to the process you’re running.
so it's not just that I didn't copy something...
Re: Keyboard shortcuts for GNU Readline
#84 Less Useful Key Bindings:
C-l Clear screen
This is the one I use most frequently. All day every day. I hate clutter and unless I need to refer to the output from the previous commands, it's gone.Re: Keyboard shortcuts for GNU Readline
#85Ctrl-R! Ctrl-R! Ctrl-R! How many people have been on a screen sharing call and watched the other person tediously up-arrow through 5-10 commands to try to rerun what they just did? The single greatest productivity boost you can gift a CLI newbie is searching their command history. Everyone jumps on the Emacs nav keys (C-f, C-b, etc) or other editing trivia. No one has trouble editing a command in place but it certain…
For extra boost, add fzf and its shell integration. https://github.com/junegunn/fzf
Re: Keyboard shortcuts for GNU Readline
#86Re: Keyboard shortcuts for GNU Readline
#87For anyone using a Mac, the basic cursor movement commands available in readline and emacs—C-f, C-b, C-a, C-e, C-n, C-p—are also available in virtually any text input in any program, namely web browser inputs, url bars, and textareas, as well as all system UIs. Once you get used to using these shortcuts that means you can compose and edit text anywhere without ever moving your hands. I recently switched to using Linu…
C-a, C-k are probably my most used shortcuts on the mac
So you can do C-s-a and C-s-e, followed by cmd-C, to copy stuff to the native clipboard.
(Kill and yank (C-k and C-y) work too, but not across applications.)
Re: Keyboard shortcuts for GNU Readline
#88For anyone using a Mac, the basic cursor movement commands available in readline and emacs—C-f, C-b, C-a, C-e, C-n, C-p—are also available in virtually any text input in any program, namely web browser inputs, url bars, and textareas, as well as all system UIs. Once you get used to using these shortcuts that means you can compose and edit text anywhere without ever moving your hands. I recently switched to using Linu…
I used to be a big enthusiast of keyboard shortcuts, now I’m getting fed up of how many there are, every program has a zillion shortcuts all stacked on top of each other. Someone needs to come up with a better way (cough Jeff Raskin THE?).
This one is notably egregious, hands up anyone who prints often enough to need a keyboard shortcut; someone who prints as often as they new-tab, as often as they Ctrl-s a text file, as often as they copy/paste? Anyone? If only there was a universal way to unbind them.
Re: Keyboard shortcuts for GNU Readline
#89For anyone using a Mac, the basic cursor movement commands available in readline and emacs—C-f, C-b, C-a, C-e, C-n, C-p—are also available in virtually any text input in any program, namely web browser inputs, url bars, and textareas, as well as all system UIs. Once you get used to using these shortcuts that means you can compose and edit text anywhere without ever moving your hands. I recently switched to using Linu…
Note for people still using macos, you can enable many more readline shortcuts by creating a special file at ~/Library/KeyBindings/DefaultKeyBinding.dict. I made a repo that simplifies the process to just a single git clone when setting up a new machine: https://github.com/alexdavid/keybindings
Re: Keyboard shortcuts for GNU Readline
#90Earlier quoted context omitted.
In ~20 years of professional programming, I have never explored much beyond these shortcuts, except for also using: * ctrl-left/ctrl-right to go back/forward word by word instead of char by char * ^C to cancel the current line
Oh my gosh thank you. I once went back by a word and swore I hallucinated, then realized the shortcut probably exists but never bothered to look into it.