mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-24 11:51:50 +08:00
Compare commits
2 Commits
69c17b42ad
...
377024a013
Author | SHA1 | Date | |
---|---|---|---|
|
377024a013 | ||
|
c1b4665890 |
55
.zshrc
55
.zshrc
@ -22,6 +22,8 @@ zinit ice lucid wait
|
||||
zinit light juancldcmt/colorize
|
||||
zinit ice lucid wait
|
||||
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 light sindresorhus/pure
|
||||
@ -29,7 +31,6 @@ zinit light zsh-users/zsh-autosuggestions
|
||||
zinit light hlissner/zsh-autopair
|
||||
zinit light zsh-users/zsh-history-substring-search
|
||||
|
||||
|
||||
autoload -Uz _zinit
|
||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||
|
||||
@ -67,43 +68,15 @@ autoload edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey '' edit-command-line
|
||||
|
||||
export ZSHZ_CASE=smart
|
||||
export ZSHZ_DATA="$HOME/.cache/z"
|
||||
zz () {
|
||||
cd `z -l $* | fzf | awk '{print $2}'`
|
||||
}
|
||||
alias zc="z -c"
|
||||
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
|
||||
|
||||
n ()
|
||||
{
|
||||
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 '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
# 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
|
||||
}
|
||||
bindkey ' ' magic-space
|
||||
|
||||
#config location
|
||||
export GOPATH=$HOME/.cache/go
|
||||
@ -135,13 +108,3 @@ export MANPATH="${MANPATH}:${HOME}/.local/share/man"
|
||||
#ccache support
|
||||
export USE_CCACHE=1
|
||||
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