Closed blueyed closed 10 years ago
+1
+1
Pull requests welcome!
+1 and I wanted to add that it'd be cool if this was non-blocking, though in long searches it might be odd to have the buffer change while you're still typing
This sounds like a job for tpope's dispatch.vim.
After installing dispatch.vim these lines in ack.vim do the trick:
setlocal errorformat=%f:%l:%c:%m
let &l:makeprg=g:ackprg." ".grepargs
Make
@svermeulen I tried to add those lines at the end of ack.vim but I have a an error:
line 179:
E121: Undefined variable: grepargs
E15: Invalid expression: g:ackprg." ".grepargs
line 180:
E492: Not an editor command: Make
Do you know what I am doing wrong?
I don't think we can do it on vim without dispatch or something like that. If you find another way to do this without an external gem, please, open a pull request. Thank's
@dirac3000 Did you install vim-dispatch?
@svermeulen yes, I did! I realized though that the order of my bundles was wrong. Now I corrected it, but the situation is worse, i.e. When I launch gvim I see this error:
line 179:
E121: Undefined variable: grepargs
E15: Invalid expression: g:ackprg." ".grepargs
:!make | tee /tmp/vbmtOKE/2
make: *** No targets specified and no makefile found. Stop.
Vim: Error reading input, exiting...nue
Vim: Finished.
Any ideas?
@svermeulen Can't get it to work either... Where in ack.vim should you add that?
It would be very cool if we could make ack.vim compatible with Dispatch.
EDIT: Messed around with this a bit and got something that seems to work. Will make a PR.
When searching in large project trees it would be very useful to execute
:Ack
asynchronously in the background.I am not sure about how to implement this and if it makes sense at all, but wanted to request it.
Here is some reference to the Vim Wiki: http://vim.wikia.com/wiki/Background\_grep\_searches