rking / ag.vim

Vim plugin for the_silver_searcher, 'ag', a replacement for the Perl module / CLI script 'ack'
1.74k stars 131 forks source link

Make it work with --color-match? #52

Open suan opened 10 years ago

suan commented 10 years ago

Looks like ag.vim ignores the --color-match option right now. Would be great if it could be supported. Looks like ack.vim doesn't have it either: https://github.com/mileszs/ack.vim/issues/94

losingkeys commented 10 years ago

This is a great idea! I'm not sure how easy it is do do though... With the following:

let g:agprg="ag --color-match --column"

The matches can't be jumped to, because g:agformat doesn't match the output (which now has color codes in it).

Maybe messing with g:agformat could fix this, and display the colors? I'll have to look into it again later.

losingkeys commented 9 years ago

I'm not sure that vim'll parse the color codes for different/any terminals when adding strings to the location list. This may be harder than I thought (or just not worth the effort). Need to do more research.

Remiol commented 7 years ago

Same here, I was trying to color the matches but ag.vim ignores the --color-match option