Add Ack plugin with Ag support

This commit is contained in:
Edward Litherland-Smith 2022-04-27 11:37:30 +01:00
parent 7c182949d7
commit aa68d37952
3 changed files with 9 additions and 0 deletions

3
.gitmodules vendored
View file

@ -62,3 +62,6 @@
[submodule "pack/plugins/start/nerdtree"]
path = pack/plugins/start/nerdtree
url = https://github.com/preservim/nerdtree.git
[submodule "pack/plugins/start/ack"]
path = pack/plugins/start/ack
url = git@github.com:mileszs/ack.vim.git

@ -0,0 +1 @@
Subproject commit 36e40f9ec91bdbf6f1adf408522a73a6925c3042

5
vimrc
View file

@ -18,6 +18,10 @@ set signcolumn=yes
set rtp+=~/.fzf
map ; :Files<CR>
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
colorscheme onehalfdark
if exists('+termguicolors') && ($COLORTERM == "24bit" || $COLORTERM == "truecolor")
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
@ -82,6 +86,7 @@ nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
nnoremap <Leader>a :Ack!<Space>
" Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif