mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-24 20:01:49 +08:00
Compare commits
No commits in common. "377024a01337be724febed6d05f01d3bf731e514" and "69c17b42ad683719bfaa56d5afcfbd2101706292" have entirely different histories.
377024a013
...
69c17b42ad
55
.zshrc
55
.zshrc
@ -22,8 +22,6 @@ zinit ice lucid wait
|
|||||||
zinit light juancldcmt/colorize
|
zinit light juancldcmt/colorize
|
||||||
zinit ice lucid wait
|
zinit ice lucid wait
|
||||||
zinit light juancldcmt/shortify.zsh
|
zinit light juancldcmt/shortify.zsh
|
||||||
zinit ice lucid wait
|
|
||||||
zinit light juancldcmt/direnv.zsh
|
|
||||||
|
|
||||||
zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh'
|
zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh'
|
||||||
zinit light sindresorhus/pure
|
zinit light sindresorhus/pure
|
||||||
@ -31,6 +29,7 @@ zinit light zsh-users/zsh-autosuggestions
|
|||||||
zinit light hlissner/zsh-autopair
|
zinit light hlissner/zsh-autopair
|
||||||
zinit light zsh-users/zsh-history-substring-search
|
zinit light zsh-users/zsh-history-substring-search
|
||||||
|
|
||||||
|
|
||||||
autoload -Uz _zinit
|
autoload -Uz _zinit
|
||||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||||
|
|
||||||
@ -68,15 +67,43 @@ autoload edit-command-line
|
|||||||
zle -N edit-command-line
|
zle -N edit-command-line
|
||||||
bindkey '' edit-command-line
|
bindkey '' edit-command-line
|
||||||
|
|
||||||
bindkey -M menuselect 'h' vi-backward-char
|
export ZSHZ_CASE=smart
|
||||||
bindkey -M menuselect 'k' vi-up-line-or-history
|
export ZSHZ_DATA="$HOME/.cache/z"
|
||||||
bindkey -M menuselect 'l' vi-forward-char
|
zz () {
|
||||||
bindkey -M menuselect 'j' vi-down-line-or-history
|
cd `z -l $* | fzf | awk '{print $2}'`
|
||||||
|
}
|
||||||
|
alias zc="z -c"
|
||||||
|
|
||||||
bindkey '^[[A' history-substring-search-up
|
n ()
|
||||||
bindkey '^[[B' history-substring-search-down
|
{
|
||||||
|
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
|
||||||
|
echo "nnn is already running"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||||
|
PAGER="bat" nnn "$@"
|
||||||
|
if [ -f "$NNN_TMPFILE" ]; then
|
||||||
|
. "$NNN_TMPFILE"
|
||||||
|
rm -f "$NNN_TMPFILE" > /dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
bindkey ' ' magic-space
|
# get cheat sheet
|
||||||
|
cb () {
|
||||||
|
curl -s cht.sh/$* | bat --decorations never
|
||||||
|
}
|
||||||
|
|
||||||
|
#start mpv detached
|
||||||
|
dmpv () {
|
||||||
|
mpv $* &> /dev/null &
|
||||||
|
disown
|
||||||
|
}
|
||||||
|
|
||||||
|
# run mpd if not running
|
||||||
|
ncmpcpp () {
|
||||||
|
pidof mpd > /dev/null || mpd.sh > /dev/null || true
|
||||||
|
command ncmpcpp
|
||||||
|
}
|
||||||
|
|
||||||
#config location
|
#config location
|
||||||
export GOPATH=$HOME/.cache/go
|
export GOPATH=$HOME/.cache/go
|
||||||
@ -108,3 +135,13 @@ export MANPATH="${MANPATH}:${HOME}/.local/share/man"
|
|||||||
#ccache support
|
#ccache support
|
||||||
export USE_CCACHE=1
|
export USE_CCACHE=1
|
||||||
export PATH="/usr/lib/ccache/bin${PATH:+:}$PATH"
|
export PATH="/usr/lib/ccache/bin${PATH:+:}$PATH"
|
||||||
|
|
||||||
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||||
|
bindkey -M menuselect 'l' vi-forward-char
|
||||||
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||||
|
|
||||||
|
bindkey '^[[A' history-substring-search-up
|
||||||
|
bindkey '^[[B' history-substring-search-down
|
||||||
|
|
||||||
|
bindkey ' ' magic-space
|
||||||
|
Loading…
Reference in New Issue
Block a user