my custom

This commit is contained in:
Kazuki Asakura 2021-03-28 19:23:40 +09:00
parent 704fc46c3f
commit 13beea1524
4 changed files with 16 additions and 10 deletions

View file

@ -50,7 +50,7 @@ function prompt_sorin_async_callback {
fi
else
# Git target detected, update the git fragment and redisplay the prompt.
_prompt_sorin_git="${_git_target}${_git_post_target}"
_prompt_sorin_git=" ${_git_target}${_git_post_target}"
zle && zle reset-prompt
fi
;;
@ -169,10 +169,10 @@ function prompt_sorin_setup {
_prompt_sorin_pwd=''
# Define prompts.
PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} '
PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd}${_prompt_sorin_git}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} '
RPROMPT='$python_info[virtualenv]${editor_info[overwrite]}%(?:: %F{1}'
RPROMPT+=${show_return}
RPROMPT+='%f)${VIM:+" %B%F{6}V%f%b"}${_prompt_sorin_git}'
RPROMPT+='%f)${VIM:+" %B%F{6}V%f%b"}'
SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? '
}

View file

@ -38,7 +38,11 @@ zstyle ':prezto:load' pmodule \
'spectrum' \
'utility' \
'completion' \
'prompt'
'prompt' \
'syntax-highlighting' \
'autosuggestions' \
'git' \
'ssh'
#
# Autosuggestions
@ -73,7 +77,7 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
#
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
# zstyle ':prezto:module:git:status:ignore' submodules 'all'
zstyle ':prezto:module:git:status:ignore' submodules 'all'
#
# GNU Utility
@ -121,7 +125,7 @@ zstyle ':prezto:module:prompt' theme 'sorin'
# Set the working directory prompt display length.
# By default, it is set to 'short'. Set it to 'long' (without '~' expansion)
# for longer or 'full' (with '~' expansion) for even longer prompt display.
# zstyle ':prezto:module:prompt' pwd-length 'short'
zstyle ':prezto:module:prompt' pwd-length 'long'
# Set the prompt to display the return code along with an indicator for non-zero
# return codes. This is not supported by all prompts.
@ -159,7 +163,7 @@ zstyle ':prezto:module:prompt' theme 'sorin'
#
# Set the SSH identities to load into the agent.
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
zstyle ':prezto:module:ssh:load' identities 'id_ed25519'
#
# Syntax Highlighting

View file

@ -17,8 +17,8 @@ fi
# Editors
#
export EDITOR='nano'
export VISUAL='nano'
export EDITOR='vim'
export VISUAL='code'
export PAGER='less'
#
@ -26,7 +26,7 @@ export PAGER='less'
#
if [[ -z "$LANG" ]]; then
export LANG='en_US.UTF-8'
export LANG='ja_JP.UTF-8'
fi
#

View file

@ -11,3 +11,5 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
fi
# Customize to your needs...
restart() { exec $SHELL -l }