My zsh config made from scratch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
763 B

2 years ago
  1. # The default text editing behaviour
  2. bindkey "^[[1;5C" forward-word #Ctrl+right goes forwards one word
  3. bindkey "^[[1;5D" backward-word #Ctrl+left goes backwards one word
  4. bindkey "^[[1;3C" forward-word #Alt+right goes forwards one word
  5. bindkey "^[[1;3D" backward-word #Alt+left goes backwards one word
  6. if echo "$TERM" | grep xterm >> /dev/null; then
  7. # Applies specifically to xterm - tested on st, and it doesn't seem to work
  8. bindkey '^[[H' beginning-of-line #Home goes to the beginning of the line
  9. bindkey '^[[F' end-of-line #End goes to the end of the line
  10. else
  11. # Applies to all terminals (hopefully)
  12. bindkey '^[[H' beginning-of-line #Home goes to the beginning of the line
  13. bindkey '^[[4~' end-of-line #End goes to the end of the line
  14. fi