惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
博客园_首页
美团技术团队
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
J
Java Code Geeks
T
Tailwind CSS Blog
Jina AI
Jina AI
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
My Settings for the Fuzzy-finder LeaderF
2020-08-26 · via jdhao's digital space

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 example, 测试.md is shown as \346\265\213\350\257\225.md.

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

Ref:

Can not search 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 uses 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

It will 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 found.

let g:Lf_WorkingDirectoryMode = 'a'

If we use the above setting, LeaderF will find ancestor of current directory that contains .git or other root indicators. See :h g:Lf_WorkingDirectoryMode for more help.

Ref:

Refresh file indexing every time we use LeaderF?#

I created a new source file under the current project. After a while, I started LeaderF and found that I can not search the newly created file without refreshing LeaderF (i.e., press F5 to refresh). This is because LeaderF will cache your project files once you start using LeaderF for the first time, to save some precious time. To disable this behavior, that is, to indexing files every time you invoke LeaderF, add the following setting:

let g:Lf_UseMemoryCache = 0

For very large project, it may take quite some time to finish indexing files. So you should use this option with care.

Ref: