mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-24 20:01:49 +08:00
Restructure the files
This commit is contained in:
parent
c1b4665890
commit
377024a013
53
.zshrc
53
.zshrc
@ -31,7 +31,6 @@ 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
|
||||||
|
|
||||||
@ -69,43 +68,15 @@ autoload edit-command-line
|
|||||||
zle -N edit-command-line
|
zle -N edit-command-line
|
||||||
bindkey '' edit-command-line
|
bindkey '' edit-command-line
|
||||||
|
|
||||||
export ZSHZ_CASE=smart
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
export ZSHZ_DATA="$HOME/.cache/z"
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||||
zz () {
|
bindkey -M menuselect 'l' vi-forward-char
|
||||||
cd `z -l $* | fzf | awk '{print $2}'`
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||||
}
|
|
||||||
alias zc="z -c"
|
|
||||||
|
|
||||||
n ()
|
bindkey '^[[A' history-substring-search-up
|
||||||
{
|
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
|
|
||||||
}
|
|
||||||
|
|
||||||
# get cheat sheet
|
bindkey ' ' magic-space
|
||||||
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
|
||||||
@ -137,13 +108,3 @@ 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