4

I used Cygwin perl and cpan to download, compile and test a working ack, struggling with a clean working model.

Primarily using win32 Vim, it seems like I can only utilize the Cygwin ack if I change from $COMSPEC to c:/cygwin/bin/bash. Unfortunately, this breaks other useful tools within Vim. I have loaded the plugin ack.vim which seems promising, but it encounters an error after search execution and fails to render in quickfix. I have read many posts but haven't found a palatable implementation.

What is the best mechanism for executing an external ack in Cygwin from win32 Vim?

Perhaps I should look further at the Ack.vim implementation? Maybe just something as simple as quickly switching between shell implementations without Vim restart?

  • I prefer to avoid installing a win32 perl implementation if that is fair to preclude as a potential solution. While I would expect that path to work, seems that I should be able to avoid doing so, yes? – Yekoof Sep 20 '15 at 19:20
  • I recommend Ag or Ripgrep instead, as they work with Window's vim/gvim. They are also much faster, and also works with ack.vim plugin. For example, to use ag as search engine for ack.vim, in .vimrc, add line let g:ackprg = 'ag --vimgrep'. Install ag or ripgrep on windows side, not on Cygwin side to make it work on both sides (win, cygwin) – otter.pro Jun 28 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.