Search with Ack in Vim
Whenever I use vim's native
vimgrep to do global lookup in vim, I feel quite depressed because I don't use it too often, so I feel the command is complicated and I always can't remember it.
So at my colleague's suggestion, I tried Ack.vim, and I thought it was pretty good. I just encountered some small problems while installing it.
Here is an article about how to install Ack: How to install ack
Ack.vim depends on ack(>=2.0), but when I followed the instructions in Ubuntu and used the command
$ sudo apt-get install ack-grep, it always gave me the 1.9x version.
In the end, I had to follow the instructions to install it in another way:
curl http://beyondgrep.com/ack-2.14-single-file > ~/bin/ack && chmod 0755 ! #:3
But I still had path problems and permissions issues, so I just did it in a few steps: `
$ curl http://beyondgrep.com/ack-2.14-single-file > ack $ sudo mv . /ack /usr/bin/ack $ sudo chmod 0755 /usr/bin/ack`
Then check the version of ack:
$ ack --version ack 2.14 Running under Perl 5.14.2 at /usr/bin/perl
Here you go, then just follow the steps I took to install and use ack.vim. You can use Vundle as I mentioned in a previous blog.