Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upReadline shortcuts in forms / insert mode #68
Comments
The-Compiler
self-assigned this
Oct 1, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
NoSuck
commented
Mar 24, 2015
|
This would be a godsend. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jahkeup
commented
Mar 25, 2015
|
Especially for Emacs users! |
The-Compiler
added
the
priority: 3 - wishlist
label
Oct 1, 2015
The-Compiler
removed their assignment
Oct 1, 2015
The-Compiler
referenced this issue
Jan 20, 2017
Closed
How to make Ctrl-W behave like Ctrl-Backspace #2241
yantar92
referenced this issue
Jan 31, 2017
Closed
Hang on loading page https://www.psi.ch/pa/job-opportunities/ #2264
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
The-Compiler
Feb 7, 2017
Collaborator
FWIW you can do some of those things with bindings using the fake-key command:
:bind --mode=insert <Ctrl-a> fake-key <Home>
:bind --mode=insert <Ctrl-k> fake-key <Shift-End> ;; fake-key <Delete>
...
still I'm hesitant to add those bindings by default - I think most users would still expect e.g. ctrl-a to select all.
|
FWIW you can do some of those things with bindings using the
still I'm hesitant to add those bindings by default - I think most users would still expect e.g. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Al-Caveman
Feb 7, 2017
Contributor
Personally I have (thanks to The-Compiler for tellng me over IRC):
:bind --mode=insert <Ctrl-a> fake-key <Home>
:bind --mode=insert <Ctrl-e> fake-key <End>
:bind --mode=insert <Ctrl-k> fake-key <Shift-End> ;; fake-key <Delete>
And this works perfectly for me so far.
|
Personally I have (thanks to The-Compiler for tellng me over IRC):
And this works perfectly for me so far. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Chinggis6
Apr 9, 2017
alias imap "bind --force --mode insert"
imap <Ctrl-h> fake-key <Backspace>
imap <Backspace> message-info "Use Ctrl-H!"
If you hate Backspace
Chinggis6
commented
Apr 9, 2017
•
If you hate Backspace |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wsdjeg
commented
Nov 23, 2017
|
How about |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wsdjeg
commented
Nov 23, 2017
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pkillnine
commented
Nov 23, 2017
|
@wsdjeg |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
krompus
Dec 18, 2017
@pkillnine also, make sure you don't have <Ctrl-w> set to close tab; that caused me some headaches back on Pentadactyl before I unbound it. Then my issue was accidentally closing tabs when using default browsers. #justemacsproblems
krompus
commented
Dec 18, 2017
•
|
@pkillnine also, make sure you don't have |
The-Compiler
referenced this issue
Dec 18, 2017
Closed
Add rl-backward-delete-char as an instert mode command #3415
The-Compiler
changed the title from
Readline shortcuts in forms
to
Readline shortcuts in forms / insert mode
Dec 19, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rndusr
Sep 5, 2018
I think the fake-key hack should be documented in the FAQ or something.
Being forced to use the cursor keys until I found this issue was probably the
biggest hurdle for me. I had to find the fake-key hack and then figure out the
shortcuts, like . I would've been absolutely delighted to find
something like this:
c.bindings.commands = {
'insert': {
'<Ctrl-f>' : 'fake-key <Right>',
'<Ctrl-b>' : 'fake-key <Left>',
'<Ctrl-a>' : 'fake-key <Home>',
'<Ctrl-e>' : 'fake-key <End>',
'<Ctrl-n>' : 'fake-key <Down>',
'<Ctrl-p>' : 'fake-key <Up>',
'<Alt-v>' : 'fake-key <PgUp>',
'<Ctrl-v>' : 'fake-key <PgDown>',
'<Alt-f>' : 'fake-key <Ctrl-Right>',
'<Alt-b>' : 'fake-key <Ctrl-Left>',
'<Ctrl-d>' : 'fake-key <Delete>',
'<Alt-d>' : 'fake-key <Ctrl-Delete>',
'<Alt-Backspace>' : 'fake-key <Ctrl-Backspace>',
'<Ctrl-y>' : 'insert-text {primary}',
}
}
rndusr
commented
Sep 5, 2018
|
I think the Being forced to use the cursor keys until I found this issue was probably the c.bindings.commands = {
'insert': {
'<Ctrl-f>' : 'fake-key <Right>',
'<Ctrl-b>' : 'fake-key <Left>',
'<Ctrl-a>' : 'fake-key <Home>',
'<Ctrl-e>' : 'fake-key <End>',
'<Ctrl-n>' : 'fake-key <Down>',
'<Ctrl-p>' : 'fake-key <Up>',
'<Alt-v>' : 'fake-key <PgUp>',
'<Ctrl-v>' : 'fake-key <PgDown>',
'<Alt-f>' : 'fake-key <Ctrl-Right>',
'<Alt-b>' : 'fake-key <Ctrl-Left>',
'<Ctrl-d>' : 'fake-key <Delete>',
'<Alt-d>' : 'fake-key <Ctrl-Delete>',
'<Alt-Backspace>' : 'fake-key <Ctrl-Backspace>',
'<Ctrl-y>' : 'insert-text {primary}',
}
} |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jgkamat
Sep 9, 2018
Collaborator
|
I agree the visibility of this issue could be a lot better. Ideally we could
just maintain something like the snippet you just posted somewhere.
I'm not sure if it would make too much sense in the FAQ, but I wouldn't object
to adding it there :)
Maybe we should just close this issue after we do that, while we could
implement this in js somehow, I don't think there's a reason to since these
bindings work very well (I've been using it for quite a while).
rndusr writes:
… I think the fake-key hack should be documented in the FAQ or something.
Being forced to use the cursor keys until I found this issue was probably the
biggest hurdle for me. I had to find the fake-key hack and then figure out the
shortcuts, like . I would've been absolutely delighted to find
something like this:
c.bindings.commands = {
'insert': {
'<Ctrl-f>' : 'fake-key <Right>',
'<Ctrl-b>' : 'fake-key <Left>',
'<Ctrl-a>' : 'fake-key <Home>',
'<Ctrl-e>' : 'fake-key <End>',
'<Ctrl-n>' : 'fake-key <Down>',
'<Ctrl-p>' : 'fake-key <Up>',
'<Alt-v>' : 'fake-key <PgUp>',
'<Ctrl-v>' : 'fake-key <PgDown>',
'<Alt-f>' : 'fake-key <Ctrl-Right>',
'<Alt-b>' : 'fake-key <Ctrl-Left>',
'<Ctrl-d>' : 'fake-key <Delete>',
'<Alt-d>' : 'fake-key <Ctrl-Delete>',
'<Alt-Backspace>' : 'fake-key <Ctrl-Backspace>',
'<Ctrl-y>' : 'insert-text {primary}',
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rndusr
Sep 9, 2018
How about making this configurable with a boolean setting?
That snippet I posted above is a very elaborate "readline-keybindings =
True". There is no need to spell it out in every detail like that.
A setting would also solve the discoverability issue. It would be documented
together with the other settings and you could find it by searching for
"readline" on the settings reference page.
rndusr
commented
Sep 9, 2018
|
How about making this configurable with a boolean setting? That snippet I posted above is a very elaborate "readline-keybindings = A setting would also solve the discoverability issue. It would be documented |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
The-Compiler
Sep 9, 2018
Collaborator
Someone would first need to verify (ideally by writing tests) that those keybindings work as expected, and also do so on macOS and Windows. FWIW I'd still prefer a proper implementation of the same movements using JS though.
|
Someone would first need to verify (ideally by writing tests) that those keybindings work as expected, and also do so on macOS and Windows. FWIW I'd still prefer a proper implementation of the same movements using JS though. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
The-Compiler
Oct 6, 2018
Collaborator
Another point raised in #4298: Some of those keybindings (like Ctrl-U) overwrite primary selection, which is unexpected - that wouldn't happen if this were properly implemented in JavaScript.
|
Another point raised in #4298: Some of those keybindings (like |
The-Compiler commentedOct 1, 2014
It'd be nice to have readline shortcuts inside forms. However I'm not sure if it's possible to modify the cursor position etc.