Skip to content


Subversion checkout URL

You can clone with
Download ZIP
CtrlP C matching extension
C VimL Shell Python
Branch: master

Merge pull request #34 from tjouan/fix-windows_compilation_instructio…


Fix typo in compilation instructions for Windows
latest commit eff706cff3
@JazzCore authored

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 no real drawbacks, but i need to point out some things that may not work as you expected:

  • Regex mode doesnt 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.

  3. Edit your .vimrc:

    Add following line:

    let g:ctrlp_match_func = {'match' : 'matcher#cmatch' }
  4. All done!

Something went wrong with that request. Please try again.