Skip to content

Instantly share code, notes, and snippets.

@mdbetancourt
Last active October 29, 2020 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdbetancourt/6490023ce263de2b944da47ce8a1ee73 to your computer and use it in GitHub Desktop.
Save mdbetancourt/6490023ce263de2b944da47ce8a1ee73 to your computer and use it in GitHub Desktop.
My zsh config
# Created by newuser for 5.8
zstyle :omz:plugins:ssh-agent identities id_rsa nemobile_rsa
zstyle :omz:plugins:ssh-agent agent-forwarding on
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
zinit ice as"completion" id-as"gcloud-complete"
zinit snippet $HOME/.google-cloud-sdk/completion.zsh.inc
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zinit-zsh/z-a-rust \
zinit-zsh/z-a-as-monitor \
zinit-zsh/z-a-patch-dl \
zinit-zsh/z-a-bin-gem-node \
zsh-users/zsh-syntax-highlighting \
zsh-users/zsh-history-substring-search \
atload"zicompinit; zpcdreplay" atclone'./zplug.zsh' \
g-plane/zsh-yarn-autocompletions
zinit ice as"command" wait lucid \
atinit"export PYTHONPATH=$ZPFX/lib/python3.7/site-packages/" \
atclone"PYTHONPATH=$ZPFX/lib/python3.7/site-packages/ \
python3 setup.py --quiet install --prefix $ZPFX" \
atpull'%atclone' test'0' \
pick"$ZPFX/bin/asciinema"
zinit load asciinema/asciinema.git
zinit ice wait"0c" lucid reset \
atclone"local P=${${(M)OSTYPE:#*darwin*}:+g}
\${P}sed -i \
'/DIR/c\DIR 38;5;63;1' LS_COLORS; \
\${P}dircolors -b LS_COLORS > c.zsh" \
atpull'%atclone' pick"c.zsh" nocompile'!' \
atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”'
zinit light trapd00r/LS_COLORS
zplugin ice as"program" pick"bin/git-dsf"
zplugin light zdharma/zsh-diff-so-fancy
zinit wait"1" lucid from"gh-r" as"null" for \
sbin"fzf" junegunn/fzf \
sbin"**/fd" @sharkdp/fd \
sbin"**/bat" @sharkdp/bat \
sbin"exa* -> exa" ogham/exa
zinit ice wait"2" lucid as"program" pick"revolver"
zinit light molovo/revolver
alias ls="exa"
alias cat="bat"
alias find="fd"
### End of Zinit's installer chunk
zinit ice depth=1; zinit light romkatv/powerlevel10k
zinit wait lucid light-mode for \
blockf \
zsh-users/zsh-completions \
atload"!_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \
as"completion" \
OMZP::docker/_docker \
OMZP::ssh-agent \
OMZP::colored-man-pages \
OMZL::git.zsh \
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
## Keybindings section
bindkey -e
bindkey '^[[7~' beginning-of-line # Home key
bindkey '^[[H' beginning-of-line # Home key
if [[ "${terminfo[khome]}" != "" ]]; then
bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
fi
bindkey '^[[8~' end-of-line # End key
bindkey '^[[F' end-of-line # End key
if [[ "${terminfo[kend]}" != "" ]]; then
bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
fi
bindkey '^[[2~' overwrite-mode # Insert key
bindkey '^[[3~' delete-char # Delete key
bindkey '^[[C' forward-char # Right key
bindkey '^[[D' backward-char # Left key
bindkey '^[[5~' history-beginning-search-backward # Page up key
bindkey '^[[6~' history-beginning-search-forward # Page down key
# Navigate words with ctrl+arrow keys
bindkey '^[Oc' forward-word #
bindkey '^[Od' backward-word #
bindkey '^[[1;5D' backward-word #
bindkey '^[[1;5C' forward-word #
bindkey '^H' backward-kill-word # delete previous word with ctrl+backspace
bindkey '^[[Z' undo # Shift+tab undo last action
bindkey '^[[A' history-substring-search-up # Search
bindkey '^[[B' history-substring-search-down
export LESS_TERMCAP_mb=$'\E[01;32m'
export LESS_TERMCAP_md=$'\E[01;32m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;47;34m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;36m'
export LESS=-r
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=,fg=green,bold'
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=,fg=red,bold'
export HISTORY_SUBSTRING_SEARCH_FUZZY=true
export ZSH_AUTOSUGGEST_STRATEGY=(history completion)
export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
export ZSH_AUTOSUGGEST_USE_ASYNC=true
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
zstyle ':completion:*' rehash true # automatically find new executables in path
# Speed up completions
zstyle ':completion:*' accept-exact '*(N)'
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path $HOME/.zsh/cache
export HISTFILE=$HOME/.zhistory
export HISTSIZE=1000
export SAVEHIST=5000
setopt correct # Auto correct mistakes
setopt extendedglob # Extended globbing. Allows using regular expressions with *
setopt nocaseglob # Case insensitive globbing
setopt rcexpandparam # Array expension with parameters
setopt nocheckjobs # Don't warn about running processes when exiting
setopt numericglobsort # Sort filenames numerically when it makes sense
setopt nobeep # No beep
setopt appendhistory # Immediately append history instead of overwriting
setopt histignorealldups # If a new command is a duplicate, remove the older one
setopt autocd # if only directory path is entered, cd there.
# The next line updates PATH for the Google Cloud SDK.
if [ -f $HOME/.google-cloud-sdk/path.zsh.inc ]; then . $HOME/.google-cloud-sdk/path.zsh.inc; fi
@mdbetancourt
Copy link
Author

https://i.imgur.com/6y6CrIA.png mi paleta de colores en la terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment