zsh-autoquoter

This commit is contained in:
Christoph J. Scherr 2024-07-15 11:26:00 +02:00
parent 865b9d8b0c
commit 4da8e3e53d
3 changed files with 13 additions and 1 deletions

3
.gitmodules vendored
View File

@ -4,3 +4,6 @@
[submodule "nvchad-custom"]
path = .custon/nvim/lua/custom
url = https://git.cscherr.de/PlexSheep/nvchad-custom
[submodule ".zsh/plugins/zsh-autoquoter"]
path = .zsh/plugins/zsh-autoquoter
url = https://github.com/ianthehenry/zsh-autoquoter

@ -0,0 +1 @@
Subproject commit 9e3b1b216bf7b61a9807a242bae730b5fc232a44

10
.zshrc
View File

@ -55,7 +55,10 @@ function condac() {
conda activate $@
export HOST=$(hostname)
}
# TODO: make neorg a function, take a workspace as arg
# calculate on shell with `c 1+1`
function c() { printf "%s\n" "$@" | bc -l; }
# call python in a print from args
function py() { python -c "from math import *; print($*)" }
### ---- zsh options -------------------------------------
setopt autocd
@ -166,10 +169,15 @@ fi
### ---- PLUGINS -----------------------------------
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
source $ZSH/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source $ZSH/plugins/zsh-autoquoter/zsh-autoquoter.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(zaq)
source ~/.local/share/fzf/key-bindings.zsh
source ~/.local/share/fzf/completion.zsh
fpath=($ZSH/plugins/zsh-completions/src $fpath)
ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m')
ZAQ_PREFIXES_GREEDY+=('py #')
### --- fzf Config ------------------------------------
export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
export FZF_CTRL_R_OPTS='--no-sort --exact'