commit 4542f70efeb7c1a4aadc8621b76cfc36e7947646
parent f5b3ac441689be96dd8b21607ea24d2aadcf856c
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sun, 11 Oct 2020 16:07:26 +0200
fzf: move into tools submodule
Former-commit-id: 35506600eeaf8018e6a077d7c95f0f8e71ed9470
Diffstat:
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.gitmodules b/.gitmodules
@@ -41,3 +41,6 @@
 [submodule "tools/anotools-chrome"]
 	path = tools/anotools-chrome
 	url = https://git.alex.balgavy.eu/anotools-chrome.git
+[submodule "tools/fzf"]
+	path = tools/fzf
+	url = https://github.com/junegunn/fzf.git
diff --git a/shell/zshrc b/shell/zshrc
@@ -70,7 +70,7 @@ source_if_exists ~/.p10k.zsh
 source_if_exists $DOTFILES/shell/powerlevel10k/powerlevel10k.zsh-theme
 
 # FZF for fuzzy finding
-source_if_exists ~/.fzf.zsh
+source_if_exists "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
 
 # Ruby bundler plugin, automatically runs binstub in .bin or `bundle exec`s
 source_if_exists $DOTFILES/shell/zsh-plugins/bundler.plugin.zsh
diff --git a/tools/fzf b/tools/fzf
@@ -0,0 +1 @@
+Subproject commit fc7630a66d8b07ec90603f7919f8aadf891783ac
diff --git a/vim/vimrc b/vim/vimrc
@@ -1,5 +1,10 @@
 " vim: foldmethod=marker foldlevel=0
 let mapleader=" "   " Set the mapleader to be space
+if empty($DOTFILES)
+  throw "Please set the $DOTFILES variable, required for tool detection."
+  finish
+endif
+
 " Plugins {{{1
 " Installation {{{2
 " Install vim-plug if needed
@@ -75,7 +80,7 @@ Plug 'gastonsimone/vim-dokumentary'
 Plug 'romainl/vim-devdocs', { 'on': 'DD' }
 
 " Fuzzy finder in vim
-Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all', 'on': ['FZF', 'Tags', 'Buffers', 'Files', 'Helptags', 'Lines', 'Ag'] }
+Plug 'junegunn/fzf', { 'dir': '$DOTFILES/tools/fzf', 'do': './install --all --xdg --no-fish', 'on': ['FZF', 'Tags', 'Buffers', 'Files', 'Helptags', 'Lines', 'Ag'] }
 Plug 'junegunn/fzf.vim', { 'on': ['FZF', 'Tags', 'Buffers', 'Files', 'Helptags', 'Lines', 'Ag', 'Filetypes'] }
 
 " Better abbrevation and substitution
@@ -251,7 +256,7 @@ let g:dokumentary_docprgs = {'ruby': 'ri {0} | col -b'}
 " Work with variants of words easily
 let g:abolish_save_file = $DOTFILES.'/vim/abolish_save_file.vim'
 " Fzf {{{3
-set rtp+=~/.fzf
+set rtp+="$DOTFILES"/tools/fzf
 function! s:build_quickfix_list(lines)
   call setqflist(map(copy(a:lines), '{ "filename": v:val }'))
   copen