Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # place on your .zshenv
- # export ZPLUG_HOME=~/.dotfiles/zsh
- # export EDITOR=/bin/nvim
- source ${ZPLUG_HOME}/init.zsh
- setxkbmap -model abnt2 -layout br
- # tap to click on touchpad
- # synclient TapButton1=1 TapButton2=3 TapButton3=2
- setopt autocd
- setopt complete_in_word
- # ignore case completion
- zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
- bindkey '^ ' autosuggest-accept
- bindkey "\e[3~" delete-char
- # Copy the most recent command to the clipboard
- function _pbcopy_last_command(){
- fc -ln -1 | pbcopy
- }
- zle -N pbcopy-last-command _pbcopy_last_command
- bindkey '^x^l' pbcopy-last-command
- # Edit content of clipboard on vim (scratch buffer)
- function _edit_clipboard(){
- pbpaste | vimscratch -
- }
- zle -N edit-clipboard _edit_clipboard
- bindkey '^x^v' edit-clipboard
- # put the cursor in a subshell $()
- function _zle_subshell {
- RBUFFER='$()'"$RBUFFER"
- ((CURSOR=CURSOR+2))
- }
- zle -N _zle_subshell
- bindkey '^J' _zle_subshell
- fancy-ctrl-z () {
- if [[ $#BUFFER -eq 0 ]]; then
- BUFFER="fg"
- zle accept-line
- else
- zle push-input
- zle clear-screen
- fi
- }
- zle -N fancy-ctrl-z
- bindkey '^Z' fancy-ctrl-z
- [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
- source $ZPLUG_HOME/aliases
- ############## ZPLUG STARTS HERE #################
- # plugins installation goes below
- ### Pure prompt
- zplug mafredri/zsh-async, from:github
- zplug sindresorhus/pure, use:pure.zsh, from:github, as:theme
- zplug "zsh-users/zsh-autosuggestions"
- if zplug check zsh-users/zsh-autosuggestions; then
- ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-substring-search-up history-substring-search-down)
- ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")
- fi
- # defer means to load this plugin after all the other plugins
- zplug "zdharma/fast-syntax-highlighting", defer:2
- # command auto-suggestion based on history
- zplug "zsh-users/zsh-autosuggestions"
- # z.lua is plugin which makes directory navigation faster. Install it with zplug:
- # 10 times faster than fasd
- zplug "skywind3000/z.lua"
- if ! zplug check --verbose; then
- printf "Install? [y/N]: "
- if read -q; then
- echo; zplug install
- fi
- fi
- # zplug load --verbose
- zplug load
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement