Code Monkey home page Code Monkey logo

leaderf's Introduction

LeaderF

This plugin is mainly used for locating files, buffers, mrus in large project.

  • Written in Python.
  • Support for fuzzy and regex searching.
  • Manage buffers and mrus.
  • Open multiple files at once.
  • Extensible.

Screenshots

enter image description here

enter image description here

Requirements

  • vim7.0 or higher.
  • vim compiled with Python support, you can check by using echo has('python') or echo has('python3') to see if the result is 1.

Installation

To install this plugin just put the plugin files in your ~/.vim (Linux) or ~/vimfiles (Windows).
For Vundle user, just add Bundle 'Yggdroot/LeaderF' to your .vimrc.

Usage

  • :Leaderf or :Leaderf [directory] or ,f
    Launch LeaderF to search files.

  • :LeaderfBuffer or ,b
    Launch LeaderF to search buffers.

  • :LeaderfMru
    Launch LeaderF to search Mru.

Once LeaderF is launched:

  • <C-C> : quit from LeaderF.
  • <C-R> : switch between fuzzy search mode and regex mode.
  • <C-F> : switch between full path search mode and name only search mode.
  • <ESC> : switch to normal mode.
  • <C-V> : paste from clipboard.
  • <C-U> : clear the prompt.
  • <C-J>, <Down>, <C-K>, <Up> : navigate the result list.
  • <2-LeftMouse> or <CR> : open the file under cursor or selected(when multiple files are selected).
  • <C-X> : open in horizontal split window.
  • <C-]> : open in vertical split window.
  • <C-T> : open in new tabpage.
  • <F5> : refresh the cache.
  • <C-LeftMouse> or <C-S> : select multiple files.
  • <S-LeftMouse> : select consecutive multiple files.
  • <C-A> : select all files.
  • <C-L> : clear all selections.

Input formats:

  • In NameOnly mode (fuzzy)

'abc' is interpreted as vim's regexp 'a.\{-}b.\{-}c'.
If the first character you input is '/', then the searching will be the same as in FullPath mode.
If you input string as 'abc/def/gh', then 'abc' will match the file name and 'def/gh' will match the directory name as in FullPath mode.

  • In FullPath mode (fuzzy)

'ab' is interpreted as vim's regexp 'a[^/]\{-}b'.
'/' is interpreted as vim's regexp '[/].\{-}'.
'ab/c' is interpreted as vim's regexp 'a[^/]\{-}b[^/]\{-}[/].\{-}[^/]\{-}c'.
If you want to search '/example/full/path/mode/filename.txt', you must input like this: 'ex/fu/pa/mo/file' (NOTE that '/' is essential in the input), and 'exfupamofile' won't match.
The purpose for this restriction is to decrease the number of matches.

  • In Regexp mode

The input string is the same as the Vim's regexp.

Related works

  • ctrlp is a great plugin. Some ideas of my plugin come from it.

Advantages over ctrlp

The only advantage over ctrlp is performance. If you are smart enough, perhaps you can find more.

License

This plugin is released under the Vim License.

leaderf's People

Contributors

einfachtoll avatar yggdroot avatar

Watchers

 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.