Remove deps on oh my zsh
This commit is contained in:
@@ -2,36 +2,32 @@ export ZSH="/home/$USER/.ohmyzsh"
|
|||||||
|
|
||||||
ZSH_THEME="the-one"
|
ZSH_THEME="the-one"
|
||||||
|
|
||||||
|
## Prompt
|
||||||
|
autoload -Uz vcs_info
|
||||||
|
autoload -U colors && colors
|
||||||
|
precmd_vcs_info() { vcs_info }
|
||||||
|
precmd_functions+=( precmd_vcs_info )
|
||||||
|
setopt prompt_subst
|
||||||
|
export PROMPT="%{$fg[yellow]%}%m %{$fg_bold[green]%}➜ %{$fg_bold[blue]%}%~ %{$fg_bold[red]%}\$vcs_info_msg_0_ %{$reset_color%}"
|
||||||
|
zstyle ':vcs_info:git:*' formats '%b'
|
||||||
|
|
||||||
DISABLE_AUTO_UPDATE="true"
|
DISABLE_AUTO_UPDATE="true"
|
||||||
COMPLETION_WAITING_DOTS="true"
|
COMPLETION_WAITING_DOTS="true"
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
plugins=(
|
plugins=()
|
||||||
git
|
#source $ZSH/oh-my-zsh.sh
|
||||||
compleat
|
|
||||||
common-aliases
|
|
||||||
ssh-agent
|
|
||||||
vi-mode
|
|
||||||
)
|
|
||||||
|
|
||||||
# https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins
|
## Exports
|
||||||
# git: git shortcuts
|
|
||||||
# compleat: complete flags
|
|
||||||
# common-aliases: the name says it
|
|
||||||
# ssh-agent: preload ssh-keys
|
|
||||||
# vi-mode: use vim-bindings in zsh
|
|
||||||
|
|
||||||
zstyle :omz:plugins:ssh-agent identities
|
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
|
|
||||||
# Exports
|
|
||||||
export TERM="xterm-256color"
|
export TERM="xterm-256color"
|
||||||
export EDITOR="vim"
|
export EDITOR="vim"
|
||||||
export LANG="en_US.UTF-8"
|
export LANG="en_US.UTF-8"
|
||||||
export PATH=$PATH:$HOME/.local/bin
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
|
|
||||||
# More Aliases
|
## Enable ".."
|
||||||
|
setopt autocd autopushd
|
||||||
|
|
||||||
|
## Aliases
|
||||||
alias vimrc="vim ~/.vimrc"
|
alias vimrc="vim ~/.vimrc"
|
||||||
|
|
||||||
alias dotf="cd ~/dotfiles/dotfiles"
|
alias dotf="cd ~/dotfiles/dotfiles"
|
||||||
@@ -43,45 +39,65 @@ alias cachefonts="fc-cache -f -v"
|
|||||||
|
|
||||||
alias w="vim ~/vimwiki/index.md"
|
alias w="vim ~/vimwiki/index.md"
|
||||||
|
|
||||||
# Delay for vi-mode
|
alias l='ls -lFh' #size,show type,human readable
|
||||||
KEYTIMEOUT=1
|
alias la='ls -lAFh' #long list,show almost all,show type,human readable
|
||||||
|
alias ll='ls -l' #long list
|
||||||
|
|
||||||
# Cursor thickness for vi-mode
|
alias rm='rm -i' # Ask before removal
|
||||||
#function zle-keymap-select {
|
alias cp='cp -i' # Ask before removal
|
||||||
# if [[ ${KEYMAP} == vicmd ]] ||
|
alias mv='mv -i' # Ask before removal
|
||||||
# [[ $1 = 'block' ]]; then
|
|
||||||
# echo -ne '\e[2 q'
|
|
||||||
#
|
|
||||||
# elif [[ ${KEYMAP} == main ]] ||
|
|
||||||
# [[ ${KEYMAP} == viins ]] ||
|
|
||||||
# [[ ${KEYMAP} = '' ]] ||
|
|
||||||
# [[ $1 = 'beam' ]]; then
|
|
||||||
# echo -ne '\e[6 q'
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
#zle -N zle-keymap-select
|
|
||||||
#
|
|
||||||
#_fix_cursor() {
|
|
||||||
# echo -ne '\e[6 q'
|
|
||||||
#}
|
|
||||||
#
|
|
||||||
#precmd_functions+=(_fix_cursor)
|
|
||||||
|
|
||||||
# fzf
|
## Local Aliases
|
||||||
export FZF_DEFAULT_OPTS='--preview="head {}" --layout=reverse --bind=tab:down --bind=btab:up'
|
|
||||||
|
|
||||||
# fzf Bindings in zsh (C-r and C-t)
|
|
||||||
if [[ -x $(which fzf) ]]
|
|
||||||
then
|
|
||||||
source ~/.vim/bundle/fzf/shell/key-bindings.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Local Aliases
|
|
||||||
if [ -f ~/.zshrc_local ]; then
|
if [ -f ~/.zshrc_local ]; then
|
||||||
source ~/.zshrc_local
|
source ~/.zshrc_local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use C-z for 'fg'
|
## Completion
|
||||||
|
unsetopt menu_complete # do not autoselect the first completion entry
|
||||||
|
unsetopt flowcontrol
|
||||||
|
setopt auto_menu # show completion menu on successive tab press
|
||||||
|
setopt complete_in_word
|
||||||
|
setopt always_to_end
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
|
||||||
|
## History command configuration
|
||||||
|
setopt extended_history # record timestamp of command in HISTFILE
|
||||||
|
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
||||||
|
setopt hist_ignore_dups # ignore duplicated commands history list
|
||||||
|
setopt hist_ignore_space # ignore commands that start with space
|
||||||
|
setopt hist_verify # show command with history expansion to user before running it
|
||||||
|
setopt share_history # share command history data inside tmux
|
||||||
|
export HISTFILE="$HOME/.zsh_history"
|
||||||
|
|
||||||
|
## ssh-agent
|
||||||
|
if [ -f ~/.ssh/agent.env ] ; then
|
||||||
|
. ~/.ssh/agent.env > /dev/null
|
||||||
|
if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then
|
||||||
|
echo "Stale agent file found. Spawning a new agent. "
|
||||||
|
eval `ssh-agent | tee ~/.ssh/agent.env`
|
||||||
|
ssh-add
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Starting ssh-agent"
|
||||||
|
eval `ssh-agent | tee ~/.ssh/agent.env`
|
||||||
|
ssh-add
|
||||||
|
fi
|
||||||
|
|
||||||
|
## vi-mode
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
## fzf
|
||||||
|
export FZF_DEFAULT_OPTS='--preview="head {}" --layout=reverse --bind=tab:down --bind=btab:up'
|
||||||
|
|
||||||
|
## fzf Bindings in zsh (C-r and C-t)
|
||||||
|
if [[ -x $(which fzf) ]]
|
||||||
|
then
|
||||||
|
source ~/.vim/bundle/fzf/shell/key-bindings.zsh
|
||||||
|
else
|
||||||
|
bindkey '^R' history-incremental-search-backward
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Use C-z for 'fg'
|
||||||
fancy-ctrl-z () {
|
fancy-ctrl-z () {
|
||||||
if [[ $#BUFFER -eq 0 ]]; then
|
if [[ $#BUFFER -eq 0 ]]; then
|
||||||
BUFFER="fg"
|
BUFFER="fg"
|
||||||
@@ -94,5 +110,5 @@ fancy-ctrl-z () {
|
|||||||
zle -N fancy-ctrl-z
|
zle -N fancy-ctrl-z
|
||||||
bindkey '^Z' fancy-ctrl-z
|
bindkey '^Z' fancy-ctrl-z
|
||||||
|
|
||||||
# Nord dir colors
|
## Nord dir colors
|
||||||
test -r "~/.dir_colors" && eval $(dircolors ~/.dir_colors)
|
test -r "~/.dir_colors" && eval $(dircolors ~/.dir_colors)
|
||||||
|
|||||||
Reference in New Issue
Block a user