rc/zshrc

43 lines
1 KiB
Bash
Raw Permalink Normal View History

2020-05-12 20:56:32 +09:00
## Basic
# enable comments in interactive-shell
setopt interactivecomments
# disable ^S ^Q
stty stop undef start undef
2020-05-14 17:41:05 +09:00
# history
HISTFILE=~/.zsh_history
HISTSIZE=1000 # memory
SAVEHIST=1000 # file
setopt appendhistory
2020-05-12 20:56:32 +09:00
2024-02-06 18:24:02 +09:00
## Plugins
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
## Shift-Tab to accept suggestion
bindkey '\E[Z' autosuggest-accept
2020-05-12 20:56:32 +09:00
## Input
# use vim mode
bindkey -v
# imap jk to <ESC>
bindkey -Mviins -s jk '\e'
## Edit
# edit zshrc
2024-02-06 18:24:02 +09:00
vizr() {"${EDITOR:-vi}" $HOME/.zshrc && . $HOME/.zshrc}
# edit zshenv
2024-02-06 18:24:02 +09:00
vize() {"${EDITOR:-vi}" $HOME/.zshenv && . $HOME/.zshenv}
2020-05-12 20:56:32 +09:00
# edit zprofile
2024-02-06 18:24:02 +09:00
vizp() {"${EDITOR:-vi}" $HOME/.zprofile && . $HOME/.zprofile}
2020-05-12 20:56:32 +09:00
## Alias
2024-02-06 18:24:02 +09:00
alias vi='nvim'
alias vim='nvim'
alias ls='ls --color=auto'
2024-02-06 18:24:02 +09:00
alias rg='grep -r'
alias sudo='sudo '
alias start="bash -c 'systemctl start \$0; journalctl -xefu \$0'"
## Starship
#export STARSHIP_CONFIG=/etc/starship.toml
eval "$(starship init zsh)"