LeaderF is Vim/Neovim plugin to fuzzy-search files, colorschemes, tags etc. quickly. It works across different platforms flawlessly. Here are some of its settings to address minor issues.
File names with non-ascii characters shown as escaped number?
When I am inside a git repository and use
:Leaderf file, I find that files
whose names containing non-ASCII characters are shown as escaped numbers. For
测试.md is shown as
This is because
Leaderf file use
git to index files under git repos by
default. Git shows non-ASCII characters as escaped numbers. To fix this, run
the following command:
git config --global core.quotePath false
Can not seach files in a git submodule
In a git repo that has
submodules in it, I
find that command
Leaderf file can not list files under these submodules.
Why? Because in a git repository, Leaderf will the command
git ls-files to
list files, which by default
will exclude files inside git submodules.
If we are using Git 2.11 or later, we can set the following options:
let g:Lf_RecurseSubmodules = 1
Under the hood, it use the
--recurse-submodules option to list files in submodules.
If we are using older version of Git, we can use the following option:
let g:Lf_UseVersionControlTool = 0
which disable using
git to index files.
Do not show fancy filetype icons
By default, Leaderf will try to show fancy filetype icons before file names
when we use
:Leaderf file. However, due to font issues, some of the icons may
not show properly. To disable this feature, add the following option:
let g:Lf_ShowDevIcons = 0
Set working directory for git repository
In a Git repository, I want to always search files under the project root, even
though my current working directory may not be in the project root. We can set
g:Lf_WorkingDirectoryMode to customize how the project root directory is
let g:Lf_WorkingDirectoryMode = 'a'
If we use the above setting, LeaderF will find ancestor of current directory
.git or other root indicators. See
:h g:Lf_WorkingDirectoryMode for more help.
License CC BY-NC-ND 4.0