Giter VIP home page Giter VIP logo

ctrlp-cmatcher's Introduction

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!

Advantages

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

Drawbacks

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.

Installation

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

    Bundle '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:

    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/
    ./install_linux.sh
  • On Windows:

    Installation is similar to Linux version, but it can be more complicated becase 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:

    install_windows.bat

    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!

ctrlp-cmatcher's People

Contributors

aaronjensen avatar jazzcore avatar jonathandasilva avatar maxst avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.