70 lines
1.5 KiB
Bash
70 lines
1.5 KiB
Bash
#!/bin/sh
|
|
export ZDOTDIR=$HOME/.config/zsh
|
|
# HISTFILE=~/.zsh_history
|
|
setopt appendhistory
|
|
|
|
# some useful options (man zshoptions)
|
|
setopt autocd extendedglob nomatch menucomplete
|
|
setopt interactive_comments
|
|
stty stop undef # Disable ctrl-s to freeze terminal.
|
|
zle_highlight=('paste:none')
|
|
|
|
# beeping is annoying
|
|
unsetopt BEEP
|
|
|
|
# completions
|
|
|
|
# for brew
|
|
if type brew &>/dev/null
|
|
then
|
|
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
|
|
fi
|
|
|
|
autoload -Uz compinit
|
|
zstyle ':completion:*' menu select
|
|
# zstyle ':completion::complete:lsof:*' menu yes select
|
|
zmodload zsh/complist
|
|
# compinit
|
|
_comp_options+=(globdots) # Include hidden files.
|
|
|
|
autoload -U up-line-or-beginning-search
|
|
autoload -U down-line-or-beginning-search
|
|
zle -N up-line-or-beginning-search
|
|
zle -N down-line-or-beginning-search
|
|
|
|
# Colors
|
|
autoload -Uz colors && colors
|
|
|
|
# Useful Functions
|
|
source "$ZDOTDIR/zsh-functions"
|
|
|
|
# Normal files to source
|
|
zsh_add_file "zsh-exports"
|
|
zsh_add_file "zsh-aliases"
|
|
zsh_add_file "zsh-prompt"
|
|
|
|
# Plugins
|
|
repos=(
|
|
zsh-users/zsh-autosuggestions
|
|
zsh-users/zsh-completions
|
|
zdharma-continuum/fast-syntax-highlighting
|
|
hlissner/zsh-autopair
|
|
)
|
|
plugin-load $repos
|
|
|
|
# FZF
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
|
|
compinit
|
|
|
|
# Edit line in vim with ctrl-e:
|
|
autoload edit-command-line; zle -N edit-command-line
|
|
# bindkey '^e' edit-command-line
|
|
|
|
# Environment variables set everywhere
|
|
export EDITOR="micro"
|
|
export TERMINAL="kitty"
|
|
export BROWSER="floorp"
|
|
export PAGE="bat"
|
|
export VISUAL="micro"
|