Skip to content
CtrlP C matching extension
C Vim script Shell Python Batchfile
Branch: master
Clone or download
Latest commit 6c36334 Oct 15, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
autoload Fix typo in header Jul 4, 2014
.gitignore added gitignore file Jun 28, 2013
LICENSE add licence and copyrights Feb 16, 2013 Update Oct 15, 2015 Use sh instead of bash in install script: Mar 25, 2015
install_windows.bat Update installation steps May 31, 2013

CtrlP C matching extension

This is a ctrlp.vim extension which can be used to get different matching algorithm, written in C language with a small portion of Python (only to access C module).

This extension uses an adapted version of CommandT matching, big thanks to @wincent!


  • Matcher, written in C, can provide significant speed improvement when working on large projects with 10000+ files, e.g Metasploit. Dont forget to set g:ctrlp_max_files option to 0 or 10000+ if you're working on such projects.
  • In some cases you can get more precise matching results ( e.g. when trying to match exact file name like exe.rb)


There are no real drawbacks, but I need to point out some things that may not work as you expected:

  • Regex mode doesn't use C matching and probably will never use it. If you will use it with this extension it will fall back to ctrlp.vim matching and may be slow on large projects.


  1. Get extension files with your favorite method. Example for Vundle:

    Plugin 'JazzCore/ctrlp-cmatcher'
  2. Compile C extension. If you are getting any errors on this stage you can try the manual installation guide located here.

  • On Linux/Unix systems:

    First, get Python header files. Example for Debian/Ubuntu:

    [sudo] apt-get install python-dev

    Then run the installation script:

    cd ~/.vim/bundle/ctrlp-cmatcher
  • On OS X (tested with 10.9.2 Mavericks):

    First fix the compiler:

    export CFLAGS=-Qunused-arguments
    export CPPFLAGS=-Qunused-arguments

    Then run the installation script:

    cd ~/.vim/bundle/ctrlp-cmatcher
  • On Windows:

    Installation is similar to Linux version, but it can be more complicated because of weird errors during compilation.

    First of all, make sure that you have python in your %PATH%.

    Also you will need MinGW compiler suite installed. Dont forget to add C:\MinGW\bin to your %PATH%.

    Then go to ctrlp-cmatcher dir and run the installation script:


    If you are getting gcc: error: unrecognized command line option '-mno-cygwin' error, follow this fix.

  1. Edit your .vimrc:

Add following line:

let g:ctrlp_match_func = {'match' : 'matcher#cmatch' }
  1. All done!
You can’t perform that action at this time.