Add fzf tools and deps

This commit is contained in:
Mathieu Maret 2020-12-04 00:14:01 +01:00
parent 1d1d1d36aa
commit 068c3c9b13
4 changed files with 69 additions and 0 deletions

5
.vimrc
View File

@ -559,6 +559,11 @@ Plugin 'gitlab@gitlab.mathux.org:Mathieu/taglist.git'
" Tagbar look like a maintened taglist
Plugin 'majutsushi/tagbar'
" Fuzzy finder
Plugin 'junegunn/fzf'
nnoremap <silent> <leader>o :FZF<CR>
nnoremap <silent> <leader>O :FZF!<CR>
if v:version >= 800
" Async lint
Plugin 'w0rp/ale'

View File

@ -0,0 +1,21 @@
export ECLIPSE_HOME=
export ANDROID_HOME=/opt/android-sdk/
export NDK_HOME=/opt/android-ndk/
export MY_PROJECT=$HOME/Projects/genymotion
export MY_PROJECT_TOOLCHAIN=$MY_PROJECT/src/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin
#export JAVA_HOME=$HOME/local/jdk1.7.0_21
export GENYMOTION_HOME=$HOME/local/genymotion
export DEBEMAIL=mmaret@genymobile.com
export DEBFULLNAME=Mathieu Maret
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools/:$ANDROID_HOME/build-tools/android-4.2.2:$NDK_HOME:$GENYMOTION_HOME:$PATH:$MY_PROJECT_TOOLCHAIN:$HOME/local/bin
export PATH=$PATH:/home/mathieu/.local/bin
source /etc/profile.d/vte.sh
#export CCACHE_DIR=/backup/mmaret/ccache/
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
export FZF_COMPLETION_TRIGGER='²²'
export FZF_DEFAULT_OPTS="--preview='[[ \$(file --mime {}) =~ binary ]] && echo no preview for {} || (bat --style==numbers --color=always {} || cat {}) 2>/dev/null | head -300' --bind='f3:execute(bat --style=numbers {} || less -f {}),f2:toggle-preview' --preview-window='right:hidden:wrap' --height 80% --reverse"
FD_OPTIONS="--follow --exclude .git"
export FZF_DEFAULT_COMMAND="git ls-files --cached --others --exclude-standard | fd --type f --type l ${FD_OPTIONS}"

View File

@ -0,0 +1,40 @@
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" history-search-backward
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" history-search-forward
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init () {
printf '%s' "${terminfo[smkx]}"
}
function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}"
}
zle -N zle-line-init
zle -N zle-line-finish
fi

View File

@ -60,6 +60,9 @@ Vim plugins are managed by vundle. So at first lunch you have to run in vim
* firefox
* flake8
* flashplugin
* fzf
* bat
* fd
* gcc-multilib
* gedit
* gnome-calculator