Compare commits
7 commits
1db9e9af20
...
a10c7e07ee
Author | SHA1 | Date | |
---|---|---|---|
a10c7e07ee | |||
958a3b4b1c | |||
73b59f6005 | |||
d56bb87479 | |||
48569c7781 | |||
26a96cbcd9 | |||
3ff115320c |
3 changed files with 29 additions and 11 deletions
12
.zshrc
12
.zshrc
|
@ -1,5 +1,13 @@
|
|||
if [[ $TTY == *tty* ]]; then
|
||||
source .zshrc.tty
|
||||
source ${HOME}/.zshrc.tty
|
||||
else
|
||||
source .zshrc.graphic
|
||||
source ${HOME}/.zshrc.graphic
|
||||
fi
|
||||
|
||||
if [[ -f ${HOME}/.zshrc.local ]]; then
|
||||
source ${HOME}/.zshrc.local
|
||||
fi
|
||||
|
||||
if [[ -f ${HOME}/.zshrc.koyeb ]]; then
|
||||
source ${HOME}/.zshrc.koyeb
|
||||
fi
|
||||
|
|
|
@ -14,7 +14,7 @@ if [ -d "${HOME}/.config/zsh/completions" ]; then
|
|||
fi
|
||||
|
||||
### edit cmds
|
||||
export VISUAL=nvim
|
||||
export VISUAL=vim
|
||||
autoload edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey "^X^E" edit-command-line
|
||||
|
@ -29,6 +29,10 @@ antidote load
|
|||
|
||||
#. ~/.zsh_plugins.zsh
|
||||
|
||||
# bash compat
|
||||
autoload -U +X bashcompinit
|
||||
bashcompinit
|
||||
|
||||
### fasd
|
||||
|
||||
if which fasd > /dev/null; then
|
||||
|
@ -79,10 +83,10 @@ if [[ ! -z $TMUX ]]; then
|
|||
fi
|
||||
|
||||
## Editor
|
||||
export EDITOR=nvim
|
||||
export EDITOR=vim
|
||||
|
||||
## Locale
|
||||
export LANG=.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
export LANGUAGE=en_US
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
export LC_NUMERIC=en_US.UTF-8
|
||||
|
@ -325,14 +329,16 @@ fi
|
|||
### colored and fuzzy go doc
|
||||
if which bat > /dev/null; then
|
||||
function _godoc() {
|
||||
local PAGE_LANG=go
|
||||
local GO_LANG=go
|
||||
if echo $1|grep -q -E "^([a-zA-Z0-9/]+)$"; then
|
||||
go doc ${@} | bat -p -l md
|
||||
go doc ${@} | bat -p -l ${PAGE_LANG}
|
||||
elif echo $1|grep -q -E "^[a-zA-Z0-9/]+\.[a-zA-Z0-9.]+$"; then
|
||||
go doc ${@} | bat -p -l go
|
||||
go doc ${@} | bat -p -l ${GO_LANG}
|
||||
elif echo $1|grep -q -E "^([a-zA-Z0-9/._-]+)/.*\.[a-zA-Z0-9.]+$"; then
|
||||
go doc ${@} | bat -p -l go
|
||||
go doc ${@} | bat -p -l ${GO_LANG}
|
||||
else
|
||||
go doc ${@} | bat -p -l md
|
||||
go doc ${@} | bat -p -l ${PAGE_LANG}
|
||||
fi
|
||||
}
|
||||
else
|
||||
|
@ -428,6 +434,10 @@ function ,pkfr() {
|
|||
# pkpr : extract clipboard content sent using the pkfr command
|
||||
alias ,pkpr='piknik -paste | tar xzpvf -'
|
||||
|
||||
### zoxide
|
||||
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
# vim: set ft=zsh et sw=0 ts=2 sts=0:
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
|
|
|
@ -1381,7 +1381,6 @@ zle -N help-zle
|
|||
## complete word from currently visible Screen or Tmux buffer.
|
||||
if check_com -c screen || check_com -c tmux; then
|
||||
function _complete_screen_display () {
|
||||
[[ "$TERM" != "screen" ]] && return 1
|
||||
|
||||
local TMPFILE=$(mktemp)
|
||||
local -U -a _screen_display_wordlist
|
||||
|
@ -1392,8 +1391,9 @@ if check_com -c screen || check_com -c tmux; then
|
|||
#works, but crashes tmux below version 1.4
|
||||
#luckily tmux -V option to ask for version, was also added in 1.4
|
||||
tmux -V &>/dev/null || return
|
||||
tmux -q capture-pane \; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0
|
||||
tmux -q capture-pane -b 0 \; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0
|
||||
else
|
||||
[[ "$TERM" != "screen" ]] && return
|
||||
screen -X hardcopy $TMPFILE
|
||||
# screen sucks, it dumps in latin1, apparently always. so recode it
|
||||
# to system charset
|
||||
|
|
Loading…
Reference in a new issue