zsh: fix ctrl+arrow keys shortcuts
This commit is contained in:
parent
bb96cea244
commit
323779d8d8
1 changed files with 3 additions and 2 deletions
|
|
@ -29,11 +29,9 @@
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
unsetopt beep
|
unsetopt beep
|
||||||
${lib.getExe pkgs.nix-your-shell} zsh | source /dev/stdin
|
${lib.getExe pkgs.nix-your-shell} zsh | source /dev/stdin
|
||||||
|
|
||||||
# Expand !! and !$ on space (Fish-style)
|
# Expand !! and !$ on space (Fish-style)
|
||||||
bindkey ' ' magic-space
|
bindkey ' ' magic-space
|
||||||
setopt HIST_VERIFY
|
setopt HIST_VERIFY
|
||||||
|
|
||||||
# Fish-style Ctrl+Backspace: delete one path segment at a time
|
# Fish-style Ctrl+Backspace: delete one path segment at a time
|
||||||
function backward-kill-path-component() {
|
function backward-kill-path-component() {
|
||||||
if [[ "$LBUFFER" == */ ]]; then
|
if [[ "$LBUFFER" == */ ]]; then
|
||||||
|
|
@ -48,6 +46,9 @@
|
||||||
}
|
}
|
||||||
zle -N backward-kill-path-component
|
zle -N backward-kill-path-component
|
||||||
bindkey '^H' backward-kill-path-component
|
bindkey '^H' backward-kill-path-component
|
||||||
|
# Ctrl+Arrow Keys to move back and forward by a word
|
||||||
|
bindkey "^[[1;5D" backward-word
|
||||||
|
bindkey "^[[1;5C" forward-word
|
||||||
'';
|
'';
|
||||||
loginExtra = "${lib.getExe pkgs.nix-your-shell} zsh | source /dev/stdin";
|
loginExtra = "${lib.getExe pkgs.nix-your-shell} zsh | source /dev/stdin";
|
||||||
history = {
|
history = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue