Compare commits
No commits in common. "d2e6e2f3aa6f29ba0c7f2551c53bfe59b7a657a6" and "f8188a205a9bebdccfaddac02bdcd32e647f7b05" have entirely different histories.
d2e6e2f3aa
...
f8188a205a
6 changed files with 65 additions and 59 deletions
10
dot-config/zsh/all/0-zinit-module
Normal file
10
dot-config/zsh/all/0-zinit-module
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#! zsh
|
||||||
|
typeset -A ZINIT
|
||||||
|
ZINIT[HOME_DIR]=${XDG_CACHE_HOME:-~/.cache}/zinit
|
||||||
|
ZINIT[BIN_DIR]=${ZINIT[HOME_DIR]}/zinit.git
|
||||||
|
ZINIT[ZCOMPDUMP_PATH]=${XDG_CACHE_HOME:-~/.cache}/zsh/zcompdump.zsh
|
||||||
|
|
||||||
|
if [[ -e ${ZINIT[HOME_DIR]}/module/Src/zdharma_continuum/zinit.so ]]; then
|
||||||
|
module_path+=( ${ZINIT[HOME_DIR]}/module/Src )
|
||||||
|
zmodload zdharma_continuum/zinit
|
||||||
|
fi
|
|
@ -4,4 +4,4 @@
|
||||||
# to call one in a script so non-interactive shells need them.
|
# to call one in a script so non-interactive shells need them.
|
||||||
autoload count
|
autoload count
|
||||||
autoload enphp
|
autoload enphp
|
||||||
autoload -Uz zargs zcalc zmv
|
autoload -Uz zargs zmv
|
||||||
|
|
|
@ -1,17 +1,34 @@
|
||||||
#! zsh
|
#! zsh
|
||||||
|
_zsh_highlight() {}
|
||||||
|
zle-line-init() {}
|
||||||
|
zle -N zle-line-init
|
||||||
|
|
||||||
|
autoload -Uz select-word-style
|
||||||
|
select-word-style shell
|
||||||
|
|
||||||
|
# Allow S-Tab to backtrack through the completion menu.
|
||||||
|
bindkey $terminfo[kcbt] reverse-menu-complete
|
||||||
|
|
||||||
# Tweaks to vi mode:
|
# Tweaks to vi mode:
|
||||||
|
bindkey '^?' backward-delete-char # backspace over the start of Insert mode
|
||||||
bindkey 'jj' vi-cmd-mode # inoremap jj <Esc>
|
bindkey 'jj' vi-cmd-mode # inoremap jj <Esc>
|
||||||
bindkey -M vicmd K run-help # 'keywordprg'
|
|
||||||
|
|
||||||
# Backward-kill long paths one directory at a time.
|
# Backward-kill long paths one directory at a time.
|
||||||
autoload -U backward-kill-word-match
|
bindkey '^W' backward-kill-word
|
||||||
zle -N backward-kill-word-match
|
zstyle ':zle:backward-kill-word' word-style unspecified
|
||||||
bindkey '^W' backward-kill-word-match
|
zstyle ':zle:backward-kill-word' word-chars ' /'
|
||||||
zstyle ':zle:backward-kill-word-match' word-style unspecified
|
|
||||||
zstyle ':zle:backward-kill-word-match' word-chars ' /'
|
|
||||||
|
|
||||||
# Make ^Z resume your suspended job if there is one.
|
# Make ^Z resume your suspended job if there is one.
|
||||||
autoload fancy-ctrl-z
|
autoload fancy-ctrl-z
|
||||||
zle -N fancy-ctrl-z
|
zle -N fancy-ctrl-z
|
||||||
bindkey '^Z' fancy-ctrl-z
|
bindkey '^Z' fancy-ctrl-z
|
||||||
|
|
||||||
|
__fzf-z() {
|
||||||
|
z -l | tac | cut -c 12- | fzf --preview 'tree -FCL 2 {}'
|
||||||
|
}
|
||||||
|
fzf-z() {
|
||||||
|
LBUFFER+="$(__fzf-z)"
|
||||||
|
zle redisplay
|
||||||
|
}
|
||||||
|
zle -N fzf-z
|
||||||
|
bindkey '^G' fzf-z
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
vcs # git status
|
vcs # git status
|
||||||
# =========================[ Line #2 ]=========================
|
# =========================[ Line #2 ]=========================
|
||||||
newline # \n
|
newline # \n
|
||||||
background_jobs # presence of background jobs
|
|
||||||
prompt_char # prompt symbol
|
prompt_char # prompt symbol
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -49,6 +48,7 @@
|
||||||
# =========================[ Line #1 ]=========================
|
# =========================[ Line #1 ]=========================
|
||||||
status # exit code of the last command
|
status # exit code of the last command
|
||||||
command_execution_time # duration of the last command
|
command_execution_time # duration of the last command
|
||||||
|
background_jobs # presence of background jobs
|
||||||
direnv # direnv status (https://direnv.net/)
|
direnv # direnv status (https://direnv.net/)
|
||||||
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||||
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
||||||
|
@ -58,14 +58,14 @@
|
||||||
# nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
|
# nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
|
||||||
# nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
|
# nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
|
||||||
# nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
# nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
||||||
node_version # node.js version
|
# node_version # node.js version
|
||||||
# go_version # go version (https://golang.org)
|
# go_version # go version (https://golang.org)
|
||||||
# rust_version # rustc version (https://www.rust-lang.org)
|
# rust_version # rustc version (https://www.rust-lang.org)
|
||||||
# dotnet_version # .NET version (https://dotnet.microsoft.com)
|
# dotnet_version # .NET version (https://dotnet.microsoft.com)
|
||||||
php_version # php version (https://www.php.net/)
|
# php_version # php version (https://www.php.net/)
|
||||||
# laravel_version # laravel php framework version (https://laravel.com/)
|
# laravel_version # laravel php framework version (https://laravel.com/)
|
||||||
# java_version # java version (https://www.java.com/)
|
# java_version # java version (https://www.java.com/)
|
||||||
package # name@version from package.json (https://docs.npmjs.com/files/package.json)
|
# package # name@version from package.json (https://docs.npmjs.com/files/package.json)
|
||||||
# rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
|
# rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
|
||||||
# rvm # ruby version from rvm (https://rvm.io)
|
# rvm # ruby version from rvm (https://rvm.io)
|
||||||
# fvm # flutter version management (https://github.com/leoafarias/fvm)
|
# fvm # flutter version management (https://github.com/leoafarias/fvm)
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
# ip # ip address and bandwidth usage for a specified network interface
|
# ip # ip address and bandwidth usage for a specified network interface
|
||||||
# public_ip # public IP address
|
# public_ip # public IP address
|
||||||
# proxy # system-wide http/https/ftp proxy
|
# proxy # system-wide http/https/ftp proxy
|
||||||
battery # internal battery
|
# battery # internal battery
|
||||||
# wifi # wifi speed
|
# wifi # wifi speed
|
||||||
# example # example user-defined segment (see prompt_example function below)
|
# example # example user-defined segment (see prompt_example function below)
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,22 +1,30 @@
|
||||||
#! zsh
|
#! zsh
|
||||||
: ${ZIM_HOME:=$XDG_CACHE_HOME/zim}
|
|
||||||
: ${ZIM_CONFIG_FILE:=$XDG_CONFIG_HOME/zsh/zimrc.zsh}
|
|
||||||
zstyle :zim:completion dumpfile ${XDG_CACHE_HOME:-~/.cache}/zsh/zcompdump.zsh
|
|
||||||
|
|
||||||
# Sure, I typically run MacOS, which uses a case-insensitive filesystem, but
|
[[ ! -d $ZINIT[HOME_DIR] ]] && mkdir -p $ZINIT[HOME_DIR]
|
||||||
# that doesn't mean I have to like it. ;)
|
if [[ ! -d $ZINIT[BIN_DIR]/.git ]]; then
|
||||||
zstyle ':zim:*' case-sensitivity sensitive
|
git clone https://github.com/zdharma-continuum/zinit.git $ZINIT[BIN_DIR]
|
||||||
|
zcompile $ZINIT[BIN_DIR]/zinit.zsh
|
||||||
zstyle :zim:termtitle hooks preexec precmd
|
|
||||||
zstyle :zim:termtitle:preexec format '${${(A)=1}[1]}'
|
|
||||||
zstyle :zim:termtitle:precmd format '%1~'
|
|
||||||
|
|
||||||
if [[ ! -e $ZIM_HOME/zimfw.zsh ]]; then
|
|
||||||
curl -fsSL --create-dirs -o $ZIM_HOME/zimfw.zsh https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
|
|
||||||
zcompile $ZIM_HOME/zimfw.zsh
|
|
||||||
fi
|
|
||||||
if [[ ! $ZIM_HOME/init.zsh -nt $ZIM_CONFIG_FILE ]]; then
|
|
||||||
source $ZIM_HOME/zimfw.zsh init -q
|
|
||||||
fi
|
fi
|
||||||
|
source $ZINIT[BIN_DIR]/zinit.zsh
|
||||||
|
load=light
|
||||||
|
|
||||||
source $ZIM_HOME/init.zsh
|
zinit $load willghatch/zsh-saneopt
|
||||||
|
|
||||||
|
zinit $load mafredri/zsh-async
|
||||||
|
|
||||||
|
zinit ice depth'1'
|
||||||
|
zinit $load romkatv/powerlevel10k
|
||||||
|
|
||||||
|
vivid_theme=molokai
|
||||||
|
(( $+commands[vivid] )) && zinit ice atclone'./build.sh' atpull'%atclone' run-atpull
|
||||||
|
zinit $load ryanccn/vivid-zsh
|
||||||
|
|
||||||
|
zinit wait lucid light-mode for \
|
||||||
|
hlissner/zsh-autopair \
|
||||||
|
mollifier/cd-gitroot \
|
||||||
|
atinit"dot-zsh-compinit" \
|
||||||
|
zdharma-continuum/fast-syntax-highlighting \
|
||||||
|
atload"_zsh_autosuggest_start" \
|
||||||
|
zsh-users/zsh-autosuggestions \
|
||||||
|
blockf atpull'zinit creinstall -q .' \
|
||||||
|
zsh-users/zsh-completions
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
zmodule willghatch/zsh-saneopt --source saneopt.plugin.zsh
|
|
||||||
zmodule environment
|
|
||||||
|
|
||||||
zmodule mafredri/zsh-async --source async.zsh
|
|
||||||
|
|
||||||
zmodule input
|
|
||||||
zmodule run-help
|
|
||||||
zmodule magic-enter
|
|
||||||
zmodule termtitle
|
|
||||||
zmodule utility
|
|
||||||
|
|
||||||
zmodule romkatv/powerlevel10k --use degit
|
|
||||||
zmodule ryanccn/vivid-zsh --cmd 'vivid_theme=molokai source {}/vivid-zsh.plugin.zsh' --on-pull '(( ${+commands[vivid]} )) && ./build.sh'
|
|
||||||
|
|
||||||
zmodule hlissner/zsh-autopair
|
|
||||||
zmodule mollifier/cd-gitroot --fpath . --autoload cd-gitroot
|
|
||||||
zmodule kiesman99/zim-zoxide
|
|
||||||
zmodule zsh-users/zsh-autosuggestions
|
|
||||||
|
|
||||||
(( ${+commands[brew]} )) && zmodule homebrew
|
|
||||||
|
|
||||||
# Additional completion definitions for Zsh.
|
|
||||||
zmodule zsh-users/zsh-completions --fpath src
|
|
||||||
# Enables and configures smart and extensive tab completion.
|
|
||||||
# completion *must* be sourced after all modules that add completion definitions.
|
|
||||||
zmodule completion
|
|
||||||
|
|
||||||
# Fish-style syntax highlighting as you type, making the Zsh experience much more friendly!
|
|
||||||
zmodule zdharma-continuum/fast-syntax-highlighting
|
|
Loading…
Reference in a new issue