Closed nikvdp closed 7 years ago
Rather than trimming the results, why not use something like this?
autocmd FileType qf setlocal nowrap
Didn't know about that! Still doesn't quite do the trick if the lines are ridiculously long though (e.g. minified css/js files):
(this image is from after adding the autocmd
line to my vimrc)
As of commit ggreer/the_silver_searcher@9e11263acf0fdf90fdcac3d028f4ba8376601031 (25 November 2015), ag supports the -W option to limit the length of outputted lines.
Internally uses
cut
command as the pager when callingag
to stop long lines from ending up in your quickfix.Usage: In
.vimrc