gabesoft / vim-ags

Silver searcher plugin for vim
183 stars 12 forks source link

Unrecognized option --filename #6

Closed madtrick closed 9 years ago

madtrick commented 9 years ago

Hi,

I've just installed the plugin and after triggering a search in Vim (with :Ags something) the ag executable just complained about the --filename option. Here is an screenshot of the output (where you can also see the version of ag I'm running):

1__tmux

gabesoft commented 9 years ago

@madtrick yea you need ag version 0.29.1 or better. Alternatively, you can try to remove filename from g:ags_agargs but I'm not sure what the search results will look like in that case.

madtrick commented 9 years ago

Oh sorry, I didn't see the version requirement on the README https://github.com/gabesoft/vim-ags#notes

I'll try removing the --filename option and see what happens. Thanks for your time

gabesoft commented 9 years ago

I've tried using ag 0.27.0 and it seems to work fine. All you have to do is add this to your .vimrc

       let g:ags_agargs = {
                \ '--break'             : [ '', '' ],
                \ '--color'             : [ '', '' ], 
                \ '--color-line-number' : [ '"1;30"', '' ],
                \ '--color-match'       : [ '"32;40"', '' ],
                \ '--color-path'        : [ '"1;31"', '' ],
                \ '--column'            : [ '', '' ],
                \ '--context'           : [ 'g:ags_agcontext', '-C', '3' ],
                \ '--group'             : [ '', '' ],
                \ '--heading'           : [ '', '-H' ],
                \ '--max-count'         : [ 'g:ags_agmaxcount', '-m', '2000' ]
                \ }

No ---filename and no --numbers

madtrick commented 9 years ago

@gabesoft thanks though I ended up upgrading to 0.29.1 :smile: