From 679255a184dd55c9186d94e3dd750c4c63a7687d Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Wed, 7 Jul 2021 13:28:00 -0500 Subject: [PATCH] Add CTRL-P plugin to nvim --- nvim/ack | 14 +++++++++++--- nvim/plugins | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/nvim/ack b/nvim/ack index cb4b873..14b5bce 100644 --- a/nvim/ack +++ b/nvim/ack @@ -1,4 +1,12 @@ -let g:ackprg = 'ag --vimgrep --smart-case' " Use the_silver_searcher for Ack +if executable('ag') + let g:ackprg = 'ag --vimgrep --smart-case' " Use the_silver_searcher for Ack -noremap \ :Ack -noremap \ :Ack + noremap \ :Ack + noremap \ :Ack + + " 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 %s -l --nocolor -g ""' +endif diff --git a/nvim/plugins b/nvim/plugins index a7783ce..c307472 100644 --- a/nvim/plugins +++ b/nvim/plugins @@ -1,5 +1,6 @@ " Assorted plugins Plug 'cespare/vim-toml' +Plug 'ctrlpvim/ctrlp.vim' Plug 'honza/vim-snippets' Plug 'leafgarland/typescript-vim' Plug 'mileszs/ack.vim'