small updates
This commit is contained in:
parent
14475e11a0
commit
ceeb821004
|
@ -67,13 +67,13 @@ ext x?html?, has w3m, terminal = w3m "$@"
|
|||
#--------------------------------------------
|
||||
# Code
|
||||
#-------------------------------------------
|
||||
ext py = python -- "$1"
|
||||
ext pl = perl -- "$1"
|
||||
ext rb = ruby -- "$1"
|
||||
ext js = node -- "$1"
|
||||
ext sh = sh -- "$1"
|
||||
ext php = php -- "$1"
|
||||
ext lisp = emacs -- "$1"
|
||||
# ext py = python -- "$1"
|
||||
# ext pl = perl -- "$1"
|
||||
# ext rb = ruby -- "$1"
|
||||
# ext js = node -- "$1"
|
||||
# ext sh = sh -- "$1"
|
||||
# ext php = php -- "$1"
|
||||
# ext lisp = emacs -- "$1"
|
||||
|
||||
ext cue , terminal, flag t = delay .3; vim -- "$@"
|
||||
ext cue , terminal = file "$@"|less
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# vim:set ft=zsh
|
||||
source $ZDOTDIR/configs/vars
|
||||
source $ZDOTDIR/configs/functions
|
||||
source $ZDOTDIR/configs/setup
|
||||
source $ZDOTDIR/configs/widgets
|
||||
source $ZDOTDIR/configs/bindings
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# vim:set ft=zsh
|
||||
|
||||
whed() {
|
||||
$EDITOR "$(which "$1")"
|
||||
}
|
||||
|
||||
venv_prompt() {
|
||||
[[ -n ${VIRTUAL_ENV} ]] || return
|
||||
echo -e "%F{yellow}%f ${VIRTUAL_ENV:t:gs/%/%%}"
|
||||
}
|
||||
|
||||
function write_title_cmd() {
|
||||
if [ ${1[(w)1]} != "lfwrap" ]; then
|
||||
echo -ne "\033]0;$(print -P "%n@%m [%3~] » ${1[(w)1]}")\007"
|
||||
fi
|
||||
}
|
||||
|
||||
function write_title_wd() { echo -ne "\033]0;$(print -P "%n@%m [%3~]")\007" }
|
||||
|
||||
# reset_beam() { echo -ne '\e[5 q' } # Use beam shape cursor for each new prompt.
|
|
@ -1,7 +1,7 @@
|
|||
# vim:set ft=zsh
|
||||
[ ! -f $XDG_DATA_HOME/zsh/history ] && mkdir -p $XDG_DATA_HOME/zsh && touch $XDG_DATA_HOME/zsh/history
|
||||
|
||||
setopt HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS HIST_VERIFY BANG_HIST interactive_comments autocd noflowcontrol longlistjobs nonomatch notify hash_list_all share_history histignorespace
|
||||
setopt HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS HIST_VERIFY BANG_HIST interactive_comments autocd noflowcontrol longlistjobs nonomatch notify hash_list_all share_history histignorespace PROMPT_SUBST
|
||||
|
||||
autoload -Uz colors && colors
|
||||
autoload -Uz edit-command-line && zle -N edit-command-line
|
||||
|
@ -16,24 +16,11 @@ _comp_options+=(globdots)
|
|||
|
||||
zle_highlight+=(paste:none)
|
||||
|
||||
# function write_venv(){
|
||||
# echo -n "${VIRTUAL_ENV}" > "/tmp/current_venv-$$"
|
||||
# }
|
||||
# add-zsh-hook precmd write_venv
|
||||
PROMPT='%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%f%3~%F{magenta}] %(?.%F{green}.%F{red})»%f%b '
|
||||
RPROMPT='%(?..%F{red}%?) $(venv_prompt)'
|
||||
|
||||
# Set the titlestring
|
||||
function write_title_cmd() {
|
||||
if [ ${1[(w)1]} != "lfwrap" ]; then
|
||||
echo -ne "\033]0;$(print -P "%n@%m [%3~] » ${1[(w)1]}")\007"
|
||||
fi
|
||||
}
|
||||
add-zsh-hook preexec write_title_cmd
|
||||
function write_title_wd() { echo -ne "\033]0;$(print -P "%n@%m [%3~]")\007" }
|
||||
add-zsh-hook precmd write_title_wd
|
||||
|
||||
reset_beam() { echo -ne '\e[5 q' } # Use beam shape cursor for each new prompt.
|
||||
# add-zsh-hook preexec reset_beam
|
||||
|
||||
whed() {
|
||||
$EDITOR "$(which "$1")"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,4 @@
|
|||
HISTSIZE=10000000
|
||||
SAVEHIST=10000000
|
||||
HISTFILE="$XDG_DATA_HOME/zsh/history"
|
||||
PS1="%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%f%3~%F{magenta}] %(?.%F{green}.%F{red})»%f%b "
|
||||
RPS1="%(?..%F{red}%?)"
|
||||
KEYTIMEOUT=1
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 22e85e82576d5948cc2e2f874eeab4c5ff38cb54
|
||||
Subproject commit 638eeab3a135f6a11ec9334196d1ac894bbb0d3e
|
Loading…
Reference in New Issue