From 3bf4d1d703c823a6e45de9242350f4f3b9718389 Mon Sep 17 00:00:00 2001 From: CramMK Date: Mon, 15 Jun 2020 13:42:11 +0200 Subject: [PATCH] Some cleanup --- dotfiles/vim/vimrc | 6 ++++-- dotfiles/zsh/zshrc | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dotfiles/vim/vimrc b/dotfiles/vim/vimrc index 7daafa6..9f7cfea 100644 --- a/dotfiles/vim/vimrc +++ b/dotfiles/vim/vimrc @@ -14,8 +14,10 @@ Plugin 'vimwiki/vimwiki' Plugin 'dhruvasagar/vim-table-mode' " manage markdown tables " fzf -Plugin 'junegunn/fzf' -Plugin 'junegunn/fzf.vim' +if executable("fzf") + Plugin 'junegunn/fzf' + Plugin 'junegunn/fzf.vim' +endif " Colors Plugin 'arcticicestudio/nord-vim' diff --git a/dotfiles/zsh/zshrc b/dotfiles/zsh/zshrc index e0b8b91..2357f9c 100644 --- a/dotfiles/zsh/zshrc +++ b/dotfiles/zsh/zshrc @@ -29,9 +29,9 @@ source $ZSH/oh-my-zsh.sh export TERM="xterm-256color" export EDITOR="vim" export LANG="en_US.UTF-8" -export PATH=$HOME/.local/bin:$PATH +export PATH=$PATH:$HOME/.local/bin -# Aliases +# More Aliases alias vimrc="vim ~/.vimrc" alias dotf="cd ~/dotfiles/dotfiles" @@ -43,13 +43,14 @@ alias cachefonts="fc-cache -f -v" alias w="vim ~/vimwiki/index.md" -# change cursor thickness for vi-mode +# Delay for vi-mode KEYTIMEOUT=1 +# Cursor thickness for vi-mode function zle-keymap-select { if [[ ${KEYMAP} == vicmd ]] || [[ $1 = 'block' ]]; then - echo -ne '\e[1 q' + echo -ne '\e[2 q' elif [[ ${KEYMAP} == main ]] || [[ ${KEYMAP} == viins ]] || @@ -67,9 +68,15 @@ _fix_cursor() { precmd_functions+=(_fix_cursor) # fzf -export FZF_DEFAULT_OPTS='--preview="head {}" --layout=reverse' +export FZF_DEFAULT_OPTS='--preview="head {}" --layout=reverse --bind=tab:down --bind=btab:up' -# Allow local aliases +# 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 source ~/.zshrc_local fi