mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 12:30:32 +01:00
Remember recently visited directories.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,6 +3,9 @@
|
||||
# vim netrwhist exists and I don't know what it does
|
||||
vim/.vim/.netrwhist
|
||||
|
||||
# zsh's recent dirs shouldn't be versioned
|
||||
zsh/.config/zsh/.chpwd-recent-dirs
|
||||
|
||||
# Ignore the installation of services for now.
|
||||
systemd/.config/systemd/user/default.target.wants
|
||||
systemd/.config/systemd/user/timers.target.wants
|
||||
|
||||
@@ -75,6 +75,9 @@ alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""
|
||||
alias makej="make -j$(nproc)"
|
||||
alias sdc='sudo docker-compose'
|
||||
|
||||
# Ensure we can make cheap copies on btrfs
|
||||
alias cp='cp --reflink=auto'
|
||||
|
||||
if (( $+commands[thefuck] ))
|
||||
then
|
||||
alias fuck='$(thefuck $(fc -ln -1))'
|
||||
@@ -211,6 +214,13 @@ SAVEHIST=$HISTSIZE
|
||||
setopt autocd # Automatically cd to dirs typed
|
||||
setopt notify
|
||||
|
||||
#####################
|
||||
# Directory history #
|
||||
#####################
|
||||
|
||||
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook
|
||||
add-zsh-hook chpwd chpwd_recent_dirs
|
||||
|
||||
######################################
|
||||
# Application-specific configuration #
|
||||
######################################
|
||||
|
||||
@@ -6,6 +6,9 @@ autoload -U colors && colors
|
||||
# Initialize VCS prompt configuration
|
||||
autoload -Uz vcs_info
|
||||
|
||||
# And the hooks system
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
zstyle ':vcs_info:*' enable git svn
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' check-for-staged-changes true
|
||||
@@ -74,20 +77,23 @@ function prompt_rprompt() {
|
||||
echo "${(j::)rprompt}"
|
||||
}
|
||||
|
||||
function precmd () {
|
||||
function prompt_precmd () {
|
||||
# Set window title to username@machine: pwd
|
||||
print -Pn "\e]0;%n@%m: %2~\a"
|
||||
# Load VCS info
|
||||
vcs_info
|
||||
}
|
||||
|
||||
function preexec () {
|
||||
function prompt_preexec () {
|
||||
# Set window title to command about to be executed.
|
||||
if [[ -n $1 ]]; then
|
||||
print -Pn "\e]0;$1\a"
|
||||
fi
|
||||
}
|
||||
|
||||
add-zsh-hook precmd prompt_precmd
|
||||
add-zsh-hook preexec prompt_preexec
|
||||
|
||||
PS1="$(prompt_ps1)"
|
||||
RPROMPT="$(prompt_rprompt)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user