summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2018-07-17 21:56:35 +0200
committerTharre <tharre3@gmail.com>2018-07-17 22:05:33 +0200
commitd2df210813307643d6cd1f29b9b397d2ee57ee82 (patch)
treea41cffc450f56698ad1e4f95d2e68e6750d52dc0
parenta47ad306915c2a4976c931da7d5d92aad19c1ddf (diff)
downloaddotfiles-d2df210813307643d6cd1f29b9b397d2ee57ee82.tar.gz
dotfiles-d2df210813307643d6cd1f29b9b397d2ee57ee82.tar.xz
dotfiles-d2df210813307643d6cd1f29b9b397d2ee57ee82.zip
vim: replace ctrlp with fzf
CtrlP is nice when there are not a lot of files in the directory, but becomes really slow on larger codebases (i.e. the linux kernel). While it's possible to work around this to some extend, there are much better alternatives now. The most general (and fastest) of which is fzf. Combined with fd, a faster `find` it handles even absurd amounts of files practically instantly. The only real downside of this setup is that it requires both fzf and fd to be installed.
-rw-r--r--.gitmodules6
m---------.vim/bundle/ctrlp.vim0
m---------.vim/bundle/fzf.vim0
-rw-r--r--.vimrc7
4 files changed, 7 insertions, 6 deletions
diff --git a/.gitmodules b/.gitmodules
index ebc220a..3a3c81a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -32,9 +32,6 @@
[submodule "gundo.vim"]
path = .vim/bundle/gundo.vim
url = https://github.com/sjl/gundo.vim.git
-[submodule "ctrlp.vim"]
- path = .vim/bundle/ctrlp.vim
- url = https://github.com/ctrlpvim/ctrlp.vim.git
[submodule "vim-sleuth"]
path = .vim/bundle/vim-sleuth
url = https://github.com/tpope/vim-sleuth.git
@@ -71,3 +68,6 @@
[submodule ".vim/bundle/vim-commentary"]
path = .vim/bundle/vim-commentary
url = https://github.com/tpope/vim-commentary
+[submodule ".vim/bundle/fzf.vim"]
+ path = .vim/bundle/fzf.vim
+ url = https://github.com/junegunn/fzf.vim
diff --git a/.vim/bundle/ctrlp.vim b/.vim/bundle/ctrlp.vim
deleted file mode 160000
-Subproject bde7a2950adaa82e894d7bdf69e3e7383e40d22
diff --git a/.vim/bundle/fzf.vim b/.vim/bundle/fzf.vim
new file mode 160000
+Subproject 8d56bdd6ade7899f0b0a10cfc219804b4ccbc10
diff --git a/.vimrc b/.vimrc
index e330506..4654c6a 100644
--- a/.vimrc
+++ b/.vimrc
@@ -170,6 +170,8 @@ nmap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
" Automatically import
nmap <leader>ai <Plug>(JavaComplete-Imports-AddMissing)
+nnoremap <C-p> :Files<cr>
+
" }}}
" airline {{{
@@ -193,9 +195,8 @@ let g:ale_linters = {
\}
" }}}
-" ctrlp
-let g:ctrlp_max_files = 1000000
-let g:ctrlp_cmd = 'CtrlPMixed'
+" fzf
+let $FZF_DEFAULT_COMMAND='fd --type file --follow --hidden --exclude .git'
" supertab
let g:SuperTabDefaultCompletionType = "context"