Turn on Ack in MacVIm
Asked Answered
J

3

6

I'm new to MacVim and have installed Janus. I can't figure out how to search my project using Ack.vim.

For janus it says "Customizations: Janus rebinds command-shift-f () to bring up :Ack." But when I do command-shift-f I get this message:

The plugin ack is disabled for the following reason: The ack program is not installed

How do I use ack? If I have to install it, how do I do so? (guessing it has something to do with .vimrc or .vimrc.after but am not sure)

Thanks

Jobie answered 18/4, 2012 at 15:37 Comment(2)
Did you install the ack command? Ack.vim call external command ack.Palatal
I only installed Janus. Shouldn't Ack be included and turned on by default? Otherwise why list it for Janus?Jobie
F
4

You have to install ack first - it is an external program:

Instructions for Mac OS can be found on the ack-website and require MacPorts or homebrew.

Fluviomarine answered 18/4, 2012 at 15:53 Comment(3)
I have installed ack using MacPorts, which installs the binary ack-5.12. I have setup an alias ack='ack-5.12' but still MacVim refuses to brink ack upOistrakh
I still get the same error on Vim, after followin the steps. I've even set the alias. I can run 'ack' on my shell.Pentobarbital
You have to watch out where you put the alias definition: if you put in the .bashrc file it will not be available when you do not start MacVim from a command line, because .bashrc is not read at login time. You have to put the alias in the .bash_profile file (or if you use zsh into .zprofile I think). More info can be found at wikipedia: en.wikipedia.org/wiki/Unix_shell#Configuration_files_for_shellsFluviomarine
P
3

Ack is an external program and Ack.vim is only an interface to Ack. You want that interface to Ack if you already use Ack: if you don't already have it on your machine you probably don't need it.

If you really need/want to use Ack, just install it.

Pathos answered 18/4, 2012 at 15:52 Comment(0)
O
0

Actually getting the same thing here with MacVim combined with Janus.

if you open macvim via command-line 'mvim .' then ack is available. if you open via "open new macvim buffer here" ack is not available.

guessing path problems.

Orms answered 20/4, 2012 at 3:34 Comment(1)
"mvim ." via command did not give access to Ack. Once I installed Ack I was good to go.Jobie

© 2022 - 2024 — McMap. All rights reserved.