1
0
mirror of https://github.com/amix/vimrc synced 2025-06-30 20:05:01 +08:00

Updated plugins

This commit is contained in:
amix
2015-12-08 10:20:04 -03:00
parent 768c72a3ed
commit 3b37bba6cd
239 changed files with 8132 additions and 3198 deletions

View File

@ -21,13 +21,13 @@ Vim has various ways of installing plugins, the standard way is in [the document
cd ~/.vim/bundle && git clone https://github.com/rking/ag.vim ag && echo "set runtimepath^=~/.vim/bundle/ag" >> ~/.vimrc
```
Then open vim and rum `:helptags ~/.vim/bundle/ag/doc`.
Then open vim and run `:helptags ~/.vim/bundle/ag/doc`.
### Configuration ###
You can specify a custom ag name and path in your .vimrc like so:
let g:agprg="<custom-ag-path-goes-here> --vimgrep"
let g:ag_prg="<custom-ag-path-goes-here> --vimgrep"
You can configure ag.vim to always start searching from your project root
instead of the cwd

View File

@ -1,17 +1,26 @@
" NOTE: You must, of course, install ag / the_silver_searcher
" FIXME: Delete deprecated options below on or after 15-7 (6 months from when they were changed) {{{
" FIXME: Delete deprecated options below on or after 2016-4 (6 months from when the deprecation warning was added) {{{
if exists("g:agprg")
let g:ag_prg = g:agprg
echohl WarningMsg
call input('g:agprg is deprecated and will be removed. Please use g:ag_prg')
echohl None
endif
if exists("g:aghighlight")
let g:ag_highlight = g:aghighlight
echohl WarningMsg
call input('g:aghighlight is deprecated and will be removed. Please use g:ag_highlight')
echohl None
endif
if exists("g:agformat")
let g:ag_format = g:agformat
echohl WarningMsg
call input('g:agformat is deprecated and will be removed. Please use g:ag_format')
echohl None
endif
" }}} FIXME: Delete the deprecated options above on or after 15-7 (6 months from when they were changed)
@ -79,6 +88,11 @@ function! ag#Ag(cmd, args)
let l:grepargs = a:args . join(a:000, ' ')
end
if empty(l:grepargs)
echo "Usage: ':Ag {pattern}' (or just :Ag to search for the word under the cursor). See ':help :Ag' for more information."
return
endif
" Format, used to manage column jump
if a:cmd =~# '-g$'
let s:ag_format_backup=g:ag_format
@ -169,8 +183,12 @@ function! ag#Ag(cmd, args)
echom "ag.vim keys: q=quit <cr>/e/t/h/v=enter/edit/tab/split/vsplit go/T/H/gv=preview versions of same"
endif
endif
else
else " Close the split window automatically:
cclose
lclose
echohl WarningMsg
echom 'No matches for "'.a:args.'"'
echohl None
endif
endfunction