config/shell: try emacsclient and fzy
This commit is contained in:
parent
deef4afcfe
commit
a3fe85770f
|
@ -105,7 +105,7 @@ edshell() {
|
||||||
(*) file="$(find $CONFIG_SHELLS -name "$1*" | head -1 | grep . || echo "$CONFIG_SHELLS/$1")";;
|
(*) file="$(find $CONFIG_SHELLS -name "$1*" | head -1 | grep . || echo "$CONFIG_SHELLS/$1")";;
|
||||||
esac
|
esac
|
||||||
test -f "$file" && checksum="$(md5sum "$file")"
|
test -f "$file" && checksum="$(md5sum "$file")"
|
||||||
$EDITOR "$(test "$line" && case "$EDITOR" in (nvim) echo "+normal! ${line}ggzx";; (*vi*) echo "+$line";; esac || echo "--")" "${file%:*}"
|
$EDITOR "$(test "$line" && case "$EDITOR" in (nvim) echo "+normal! ${line}ggzx";; (*vi*) echo "+$line";; (emacs*) echo "+${line}";; esac || echo "--")" "${file%:*}"
|
||||||
test -s "$file" || return 1
|
test -s "$file" || return 1
|
||||||
test "$checksum" != "$(md5sum $file)" && rs
|
test "$checksum" != "$(md5sum $file)" && rs
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,8 @@ alias hx='sudo hexedit --maximize --color'
|
||||||
# Paginated hexyl
|
# Paginated hexyl
|
||||||
hex() { hexyl "$@" | "${PAGER:-less}"; }
|
hex() { hexyl "$@" | "${PAGER:-less}"; }
|
||||||
|
|
||||||
alias dic="cat $XDG_DATA_HOME/dictcc/dict.txt | sed '/#/d;/&/d;/^$/d' | fzf --tiebreak=length --bind='alt-bspace:clear-query'"
|
alias dic="cat $XDG_DATA_HOME/dictcc/dict.txt | sed '/#/d;/&/d;/^$/d' | fzy"
|
||||||
|
#fzf --tiebreak=length --bind='alt-bspace:clear-query'
|
||||||
alias dict="rlwrap rdictcc -d $XDG_DATA_HOME/dictcc"
|
alias dict="rlwrap rdictcc -d $XDG_DATA_HOME/dictcc"
|
||||||
alias dictu="dict -i $XDG_DATA_HOME/dictcc/dict.txt"
|
alias dictu="dict -i $XDG_DATA_HOME/dictcc/dict.txt"
|
||||||
|
|
||||||
|
|
12
.zshenv
12
.zshenv
|
@ -63,7 +63,17 @@ mkdir -p "$XDG_STATE_HOME/zsh"
|
||||||
|
|
||||||
# environment
|
# environment
|
||||||
export PATH="$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin:$GOPATH/bin:$XDG_DATA_HOME/gem/ruby/3.0.0/bin:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin"
|
export PATH="$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin:$GOPATH/bin:$XDG_DATA_HOME/gem/ruby/3.0.0/bin:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin"
|
||||||
which nvim >/dev/null && export EDITOR='nvim' || export EDITOR='vim'
|
export ALTERNATE_EDITOR="$(
|
||||||
|
if which nvim >/dev/null
|
||||||
|
then echo nvim
|
||||||
|
else echo vi
|
||||||
|
fi)"
|
||||||
|
export EDITOR="$(
|
||||||
|
if which emacs >/dev/null
|
||||||
|
then echo emacsclient #'emacsclient -a ""'
|
||||||
|
else echo $ALTERNATE_EDITOR
|
||||||
|
fi
|
||||||
|
)"
|
||||||
export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)"
|
export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)"
|
||||||
# TODO put into config file and use --exclude-from
|
# TODO put into config file and use --exclude-from
|
||||||
export DIRS_GENERATED="-x generated -x .gradle -x cmake_build -x dist-newstyle -x node_modules -x __pycache__"
|
export DIRS_GENERATED="-x generated -x .gradle -x cmake_build -x dist-newstyle -x node_modules -x __pycache__"
|
||||||
|
|
Loading…
Reference in New Issue