diff --git a/README-ES.md b/README-ES.md index 1009cb2..6b301e6 100644 --- a/README-ES.md +++ b/README-ES.md @@ -182,7 +182,7 @@ sin importar de nombre del archivo: ConfiguraciĆ³n [vim](http://www.vim.org/): -* [Ctrl-P](https://github.com/ctrlpvim/ctrlp.vim) para hallazgo difuso de archivos/buffer/tags. +* [fzf](https://github.com/junegunn/fzf.vim) para hallazgo difuso de archivos/buffer/tags. * [Rails.vim](https://github.com/tpope/vim-rails) para una mejor navegaciĆ³n de la estructura de archivos de Rails via `gf` y `:A` (alterno), `:Rextract` parciales,`:Rinvert` migraciones, etc. * Ejecuta muchos tipos de pruebas [desde vim]([https://github.com/janko-m/vim-test) diff --git a/README.md b/README.md index 3d9a6b9..b8c5b50 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ What's in it? [vim](http://www.vim.org/) configuration: -* [Ctrl-P](https://github.com/ctrlpvim/ctrlp.vim) for fuzzy file/buffer/tag finding. +* [fzf](https://github.com/junegunn/fzf.vim) for fuzzy file/buffer/tag finding. * [Rails.vim](https://github.com/tpope/vim-rails) for enhanced navigation of Rails file structure via `gf` and `:A` (alternate), `:Rextract` partials, `:Rinvert` migrations, etc. diff --git a/vimrc b/vimrc index 216e63e..b2a05a8 100644 --- a/vimrc +++ b/vimrc @@ -91,11 +91,8 @@ if executable('ag') " Use Ag over Grep set grepprg=ag\ --nogroup\ --nocolor - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = 'ag --literal --files-with-matches --nocolor --hidden -g "" %s' - - " ag is fast enough that CtrlP doesn't need to cache - let g:ctrlp_use_caching = 0 + " Use ag in fzf for listing files. Lightning fast and respects .gitignore + let $FZF_DEFAULT_COMMAND = 'ag --literal --files-with-matches --nocolor --hidden -g ""' if !exists(":Ag") command -nargs=+ -complete=file -bar Ag silent! grep! |cwindow|redraw! @@ -162,6 +159,9 @@ nnoremap l nnoremap ]r :ALENextWrap nnoremap [r :ALEPreviousWrap +" Map Ctrl + p to open fuzzy find (FZF) +nnoremap :Files + " Set spellfile to location that is guaranteed to exist, can be symlinked to " Dropbox or kept in Git and managed outside of thoughtbot/dotfiles using rcm. set spellfile=$HOME/.vim-spell-en.utf-8.add diff --git a/vimrc.bundles b/vimrc.bundles index 7b6e710..8c87f35 100644 --- a/vimrc.bundles +++ b/vimrc.bundles @@ -16,7 +16,12 @@ call plug#begin('~/.vim/bundle') " Define bundles via Github repos Plug 'christoomey/vim-run-interactive' -Plug 'ctrlpvim/ctrlp.vim' +if executable('fzf') + Plug '/usr/local/opt/fzf' +else + Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +endif +Plug 'junegunn/fzf.vim' Plug 'elixir-lang/vim-elixir' Plug 'fatih/vim-go' Plug 'janko-m/vim-test'