blob: bfad8c1578dffd9397577d6731ab8396a31586ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
zstyle :compinstall filename '/home/.zshrc'
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
autoload -Uz compinit
compinit
stty -ixon
keymap_file="$HOME/.config/zsh/keymap/$TERM"
[[ ! -d "$(dirname "$keymap_file")" ]] && mkdir -p "$(dirname "$keymap_file")"
[[ ! -f "$keymap_file" ]] && ~/.config/zsh/init-keymap.zsh "$keymap_file"
source "$keymap_file"
unset keymap_file
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode
[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char
[[ -n "${key[CtrlBackspace]}" ]] && bindkey -- "${key[CtrlBackspace]}" backward-delete-word
[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history
[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char
[[ -n "${key[CtrlLeft]}" ]] && bindkey -- "${key[CtrlLeft]}" backward-word
[[ -n "${key[CtrlRight]}" ]] && bindkey -- "${key[CtrlRight]}" forward-word
export EDITOR=micro
export PAGER=less
alias zm=zmachine
alias zmachine="$EDITOR ~/.config/zsh/machine.zsh"
alias zshrc="$EDITOR ~/.zshrc"
[[ -f ~/.config/zsh/machine.zsh ]] && source ~/.config/zsh/machine.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source <(starship init zsh)
|