diff options
| author | littleblack111 <jerrylam110209@gmail.com> | 2023-06-29 16:29:32 +0800 |
|---|---|---|
| committer | littleblack111 <jerrylam110209@gmail.com> | 2023-06-29 16:29:47 +0800 |
| commit | 0f532510d2001399e3800a579d4cae0762daf0bd (patch) | |
| tree | 0bb3fb21e4ea3e1e63777778afb27f2ae97b1168 /keybinds.zsh | |
| parent | fcc547feac5835da7582991f662f04aa4746b99c (diff) | |
init
Diffstat (limited to 'keybinds.zsh')
| -rwxr-xr-x | keybinds.zsh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/keybinds.zsh b/keybinds.zsh new file mode 100755 index 0000000..73bafc6 --- /dev/null +++ b/keybinds.zsh @@ -0,0 +1,27 @@ +## +## Keybindings +## + +bindkey '^[[H' beginning-of-line +bindkey '^[[F' end-of-line +bindkey -s '^K' 'ls^M' +bindkey -s '^o' '_smooth_fzf^M' + +# prepend sudo on the current commmand +bindkey -M emacs '' _sudo_command_line +bindkey -M vicmd '' _sudo_command_line +bindkey -M viins '' _sudo_command_line + +# fix backspace and other stuff in vi-mode +bindkey -M viins '\e/' _vi_search_fix +bindkey "^?" backward-delete-char +#bindkey "^H" backward-delete-char +bindkey "^U" backward-kill-line + +# check if not tty # if tty, it might break backspace/delete +if [[ $DISPLAY ]]; then + bindkey '^H' backward-kill-word + bindkey '5~' kill-word +fi + +# vim:ft=zsh:nowrap |
