All of my important config files
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.

50 lines
1.1 KiB

  1. # vim bindings
  2. bindkey -v
  3. export KEYTIMEOUT=1
  4. # Use vim cli mode
  5. bindkey '^P' up-history
  6. bindkey '^N' down-history
  7. # backspace and ^h working even after
  8. # returning from command mode
  9. bindkey '^?' backward-delete-char
  10. bindkey '^h' backward-delete-char
  11. # ctrl-w removed word backwards
  12. bindkey '^w' backward-kill-word
  13. # ctrl-r starts searching history backward
  14. bindkey '^r' history-incremental-search-backward
  15. if [ "light" = "$THEME_SWITCHER" ]; then
  16. ZSH_THEME="sunrise"
  17. else
  18. ZSH_THEME="agnoster"
  19. fi
  20. HIST_STAMPS="dd.mm.yyyy"
  21. COMPLETION_WAITING_DOTS="true"
  22. export EDITOR="vim"
  23. source $HOME/.dotfiles/zsh/aliases.zsh
  24. # fzf settings
  25. if type rg > /dev/null; then
  26. # Use ripgrep instead of find and exclude .gitignored files
  27. export FZF_DEFAULT_COMMAND='rg --files'
  28. export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
  29. _fzf_compgen_path() {
  30. rg --files "$1"
  31. }
  32. fi
  33. swth()
  34. {
  35. if [ "$THEME_SWITCHER" = "light" ]; then
  36. unset THEME_SWITCHER
  37. source ~/.zshrc
  38. else
  39. export THEME_SWITCHER="light"
  40. source ~/.zshrc
  41. fi
  42. }