Skip to content
/ LeaderF Public
forked from Yggdroot/LeaderF

Quickly locate files, buffers, mrus, ... in large project.

License

Notifications You must be signed in to change notification settings

DaSea/LeaderF

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

NameOnly Mode

FullPath Mode

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; Make sure that your python2 version is Python 2.7 or higher and python3 version is Python 3.1 or higher.

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', then 'abc' will match the file name and 'def' will match the directory name.

  • In FullPath mode (fuzzy)

Same as in NameOnly mode except that the pattern will match the full path but not the file name only.

  • 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 Apache License, Version 2.0 (the "License").

About

Quickly locate files, buffers, mrus, ... in large project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 85.5%
  • Vim Script 14.5%