Skip to content
Yggdroot edited this page Sep 23, 2024 · 17 revisions

You don't know how good it is.

  • super fast
  • asynchronous
  • out of box
  • smart enough fuzzy matching algorithm
  • easy to write an extension

Preparation

LeaderF is written in Python, it requires :echo has("python") or :echo has("python3") outputs 1 in vim/neovim.

  • For vim, if :echo has("python") or :echo has("python3") is 0, you should check:

    1. vim --version | grep +python
      If there is no output, it indicates that vim is not compiled with python support.
      Windows users can download vim from the official release, where vim has already been compiled with python support.
      If you compile vim manually, --enable-pythoninterp and/or --enable-python3interp should be appended to configure when run configure.
    2. Is Python installed on the machine?
    3. Is Python 32bit or 64bit? It should be consistent with vim.
    4. Is Python version consistent with that used at compile time?
      If not, you should use pythondll or pythonthreedll to specify the name of python shared library, for example,
      set pythondll=/Users/yggdroot/.python2.7.6/lib/libpython2.7.so
      
      or
      set pythonthreedll=/Users/yggdroot/.python3.7.5/lib/libpython3.so
      
  • For neovim, if :echo has("python") or :echo has("python3") is 0, you just need to do as below:
    For Python3:

    1. Make sure Python 3.4+ is available in your $PATH.
    2. Install the module (try "python" if "python3" is missing):
      python3 -m pip install --user --upgrade pynvim
      

    For Python2:

    1. Make sure Python 2.7 is available in your $PATH.
    2. Install the module (try "python" if "python2" is missing):
      python2 -m pip install --user --upgrade pynvim
      

    The pip --upgrade flag ensures that you get the latest version even if a previous version was already installed.

Features

Buildin subcommands

  • Leaderf file
  • Leaderf buffer
  • Leaderf mru
  • Leaderf function
  • Leaderf bufTag
  • Leaderf tag
  • Leaderf line
  • Leaderf help
  • Leaderf searchHistory
  • Leaderf cmdHistory
  • Leaderf colorscheme
  • Leaderf self
  • Leaderf rg
  • Leaderf gtags
  • Leaderf command
  • Leaderf filetype
  • Leaderf git
  • Leaderf coc

Easy to write extensions

  • use vimL to write the extension
  • use python to write the extension
Clone this wiki locally