From 0f532510d2001399e3800a579d4cae0762daf0bd Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 29 Jun 2023 16:29:32 +0800 Subject: init --- keybinds.zsh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 keybinds.zsh (limited to 'keybinds.zsh') 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 -- cgit v1.2.3