zsh: clean up
This commit is contained in:
parent
14f76e61f7
commit
1758e210f3
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
load aliases
|
load aliases
|
||||||
|
|
||||||
|
autoload -U zmv
|
||||||
|
|
||||||
alias ?='since @$last'
|
alias ?='since @$last'
|
||||||
|
|
||||||
# Fast directory navigation
|
# Fast directory navigation
|
||||||
|
@ -12,7 +14,7 @@ if is-callable 'fasd' && is-callable 'fzf'; then
|
||||||
fi
|
fi
|
||||||
# see functions/commacd
|
# see functions/commacd
|
||||||
alias ,,,='cd ${$(find ~/Dropbox/work -maxdepth 2 -type d | fzf):-.}'
|
alias ,,,='cd ${$(find ~/Dropbox/work -maxdepth 2 -type d | fzf):-.}'
|
||||||
alias ,/='fzf_project_root'
|
# alias ,/='fzf_project_root'
|
||||||
|
|
||||||
zman() { PAGER="less -g -s '+/^ "$1"'" man zshall; }
|
zman() { PAGER="less -g -s '+/^ "$1"'" man zshall; }
|
||||||
|
|
||||||
|
|
41
zsh/config
41
zsh/config
|
@ -1,27 +1,21 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
autoload -U zmv
|
export GIT_MERGE_AUTOEDIT=no
|
||||||
|
|
||||||
#
|
|
||||||
# General
|
|
||||||
#
|
|
||||||
|
|
||||||
|
## General
|
||||||
# Treat these characters as part of a word.
|
# Treat these characters as part of a word.
|
||||||
WORDCHARS='_-*?[]~&.;!#$%^(){}<>'
|
WORDCHARS='_-*?[]~&.;!#$%^(){}<>'
|
||||||
DIRSTACKSIZE=9
|
|
||||||
|
|
||||||
setopt BRACE_CCL # Allow brace character class list expansion.
|
setopt BRACE_CCL # Allow brace character class list expansion.
|
||||||
setopt COMBINING_CHARS # Combine zero-length punctuation characters (accents)
|
setopt COMBINING_CHARS # Combine zero-length punc chars (accents) with base char
|
||||||
# with the base character.
|
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'
|
||||||
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
|
setopt HASH_LIST_ALL
|
||||||
|
unsetopt CORRECT_ALL
|
||||||
|
unsetopt NOMATCH
|
||||||
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
|
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
|
||||||
|
|
||||||
unsetopt BEEP # Hush now, quiet now.
|
unsetopt BEEP # Hush now, quiet now.
|
||||||
|
|
||||||
#
|
## Jobs
|
||||||
# Jobs
|
|
||||||
#
|
|
||||||
|
|
||||||
setopt LONG_LIST_JOBS # List jobs in the long format by default.
|
setopt LONG_LIST_JOBS # List jobs in the long format by default.
|
||||||
setopt AUTO_RESUME # Attempt to resume existing job before creating a new process.
|
setopt AUTO_RESUME # Attempt to resume existing job before creating a new process.
|
||||||
setopt NOTIFY # Report status of background jobs immediately.
|
setopt NOTIFY # Report status of background jobs immediately.
|
||||||
|
@ -29,23 +23,14 @@ unsetopt BG_NICE # Don't run all background jobs at a lower priority.
|
||||||
unsetopt HUP # Don't kill jobs on shell exit.
|
unsetopt HUP # Don't kill jobs on shell exit.
|
||||||
unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
|
unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
|
||||||
|
|
||||||
export GIT_MERGE_AUTOEDIT=no
|
## History
|
||||||
unsetopt CORRECT_ALL
|
|
||||||
|
|
||||||
unsetopt NOMATCH
|
|
||||||
setopt HASH_LIST_ALL
|
|
||||||
|
|
||||||
#
|
|
||||||
# History
|
|
||||||
#
|
|
||||||
|
|
||||||
HISTFILE="${CACHE_DIR}/zhistory"
|
HISTFILE="${CACHE_DIR}/zhistory"
|
||||||
HISTSIZE=10000 # Max events to store in internal history.
|
HISTSIZE=10000 # Max events to store in internal history.
|
||||||
SAVEHIST=10000 # Max events to store in history file.
|
SAVEHIST=10000 # Max events to store in history file.
|
||||||
|
|
||||||
setopt BANG_HIST # Don't treat '!' specially during expansion.
|
setopt BANG_HIST # Don't treat '!' specially during expansion.
|
||||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||||
setopt APPEND_HISTORY
|
setopt APPEND_HISTORY # Appends history to history file on exit
|
||||||
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
|
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
|
||||||
setopt SHARE_HISTORY # Share history between all sessions.
|
setopt SHARE_HISTORY # Share history between all sessions.
|
||||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
||||||
|
@ -57,10 +42,8 @@ setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history
|
||||||
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
||||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||||
|
|
||||||
#
|
## Directories
|
||||||
# Directories
|
DIRSTACKSIZE=9
|
||||||
#
|
|
||||||
|
|
||||||
setopt AUTO_CD # Auto changes to a directory without typing cd.
|
setopt AUTO_CD # Auto changes to a directory without typing cd.
|
||||||
setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
|
setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
|
||||||
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
||||||
|
|
15
zsh/keybinds
15
zsh/keybinds
|
@ -16,10 +16,10 @@ zle -N change-surround surround
|
||||||
bindkey -a cs change-surround
|
bindkey -a cs change-surround
|
||||||
bindkey -a ds delete-surround
|
bindkey -a ds delete-surround
|
||||||
bindkey -a ys add-surround
|
bindkey -a ys add-surround
|
||||||
|
bindkey -M visual S add-surround
|
||||||
|
|
||||||
# text-objects
|
# text-objects
|
||||||
if is-at-least 5.0.8; then
|
if is-at-least 5.0.8; then
|
||||||
bindkey -M visual S add-surround
|
|
||||||
autoload -U select-quoted; zle -N select-quoted
|
autoload -U select-quoted; zle -N select-quoted
|
||||||
for m in visual viopp; do
|
for m in visual viopp; do
|
||||||
for c in {a,i}{\',\",\`}; do
|
for c in {a,i}{\',\",\`}; do
|
||||||
|
@ -48,21 +48,12 @@ bindkey -M viins '^g' push-line-or-edit
|
||||||
bindkey -M viins '^a' beginning-of-line
|
bindkey -M viins '^a' beginning-of-line
|
||||||
bindkey -M viins '^e' end-of-line
|
bindkey -M viins '^e' end-of-line
|
||||||
|
|
||||||
# Shift + Tab
|
|
||||||
bindkey -M viins '^[[Z' reverse-menu-complete
|
|
||||||
|
|
||||||
bindkey -M viins ' ' magic-space
|
bindkey -M viins ' ' magic-space
|
||||||
|
|
||||||
# Vim keymaps
|
|
||||||
bindkey -M vicmd 'ga' what-cursor-position
|
|
||||||
bindkey -M vicmd '^k' kill-line
|
bindkey -M vicmd '^k' kill-line
|
||||||
bindkey -M vicmd '?' history-incremental-pattern-search-forward
|
|
||||||
bindkey -M vicmd '/' history-incremental-pattern-search-backward
|
|
||||||
bindkey -M vicmd ':' execute-named-cmd
|
|
||||||
# Page up / Page down
|
|
||||||
bindkey -M vicmd 'H' run-help
|
bindkey -M vicmd 'H' run-help
|
||||||
|
|
||||||
bindkey -s -M vicmd ',o' "tmux resize-pane -Z\n"
|
# Shift + Tab
|
||||||
|
bindkey -M viins '^[[Z' reverse-menu-complete
|
||||||
|
|
||||||
# bind UP and DOWN arrow keys
|
# bind UP and DOWN arrow keys
|
||||||
bindkey '^[[A' history-substring-search-up
|
bindkey '^[[A' history-substring-search-up
|
||||||
|
|
1
zshrc
1
zshrc
|
@ -13,7 +13,6 @@ if ! zgen saved; then
|
||||||
zgen load StackExchange/blackbox
|
zgen load StackExchange/blackbox
|
||||||
zgen load thewtex/tmux-mem-cpu-load
|
zgen load thewtex/tmux-mem-cpu-load
|
||||||
zgen load joepvd/zsh-hints
|
zgen load joepvd/zsh-hints
|
||||||
zgen load unixorn/git-extra-commands
|
|
||||||
|
|
||||||
zgen load hlissner/zsh-autopair "autopair.zsh"
|
zgen load hlissner/zsh-autopair "autopair.zsh"
|
||||||
zgen load zsh-users/zsh-history-substring-search
|
zgen load zsh-users/zsh-history-substring-search
|
||||||
|
|
Loading…
Reference in a new issue