I am getting the following error:

/bin/bash: ccfilter: command not found

when I issue the :make command in vim. I need to install (or build) the ccfilter binary but I can't find it. Where can I find it? I looked in /usr/share/vim and I didn't see it.

This is for Ubuntu 14.04.1 LTS.

  • Did you check the current directory?
    – Seth
    Nov 12 '14 at 23:20
  • ccfilter should be distributed with vim. I've had to build it from a .c file before but I can't find it for this distro. Nov 12 '14 at 23:25
  • Whoops, my bad, I misunderstood your post. So you're saying ccfilter has nothing to do with what your compiling, but rather it is a dependency of vim's make command?
    – Seth
    Nov 12 '14 at 23:26
  • Correct. It formats the error messages so that vim can process them. Nov 12 '14 at 23:32
  • 1
    You don't need ccfilter to use Vim's quickfix feature. I've used Vim's :make command for many years and have never used ccfilter. The default 'errorformat' works fine for the compilers I use, usually gcc. ccfilter is not even mentioned in Vim's documentation any more, at least it isn't for Vim 7.2 and 7.4. I would just use the default 'shellpipe' and see how :make works then. (The ccfilter man page in /usr/share/vim/vim7[234]/tools/ says that ccfilter is used by including it in 'shellpipe', so I assume your ~/.vimrc includes that setting.)
    – garyjohn
    Dec 4 '14 at 0:28

You shouldn't need ccfilter to use :make. ccfilter seems to date from Vim 5. There is no mention of it in the current Vim documentation except for a filename change noted in version5.txt.

The default setting of the 'errorformat' option should work for many compilers. You can also use the :compiler command with the name of your compiler to optimize 'errorformat' for that compiler. If you have an uncommon compiler, you may need set the value 'errorformat' yourself to get something that works well for you. Finding the value of 'errorformat' for an unsupported compiler is not straightforward, but it's not hard--it just takes some fiddling and experimentation.

The :make command does not use ccfilter by default. The error message you're seeing suggests that one of your configuration files is telling Vim to use ccfilter. The ccfilter man page, found in $VIMFILES/tools/ccfilter.1 in distributions that include it, suggests using ccfilter as follows.

:set shellpipe=\|&ccfilter\>

So, when you see that error message, you could execute

:verbose set shellpipe?

which will show you where 'shellpipe' was last set. Edit that file and remove that line. There may be a line like the following nearby.

:set errorformat=%f:%l:%c:%t:%m

Remove that line, too, so that Vim can use its default 'errorformat'.

That should fix the problem.

You can find out more about using :make here.

:help 30.1
:help :make
:help compiler-select
:help errorformats

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.