by JazzCore

JazzCore / ctrlp-cmatcher

CtrlP C matching extension

207 Stars 21 Forks Last release: Not found BSD 2-Clause "Simplified" License 98 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

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
    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


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
    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

    in your

    Also you will need MinGW compiler suite installed. Dont forget to add

    to your

    Then go to

    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

Add following line:

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.