开发工具 Asynchronous grep on the fly

wsdjeg · 2018年01月24日 · 最后由 wsdjeg 回复于 2018年03月16日 · 5742 次阅读

原文: https://spacevim.org/grep-on-the-fly-in-spacevim/

FlyGrep means grep on the fly, it will update the result as you type. Of course, it is running asynchronously. Before using this feature, you need to install a searching tool. FlyGrep works through search tools: ag, rg, ack, pt and grep, Choose one you like.

This ia a built-in plugin in SpaceVim, and we also separated a plugin : FlyGrep.vim

Features

  • Search in a project

In SpaceVim, you can use SPC s p or SPC s / to search in the current project.

searching project

  • Search in current file

You can use SPC s s to search in the current file. To search word under the cursor, you can press SPC s S.

searching current file

  • Search in all loaded buffers

To searching in all loaded buffers, you need to press SPC s b, and you can also use SPC s B to search word under the point.

searching-loaded-buffer

  • Search in an arbitrary directory

If you want to searching in a different directory instead of current directory, you can use SPC s f. Then insert the path of the arbitrary directory.

  • Search in a project in the background

If you need background searching, you can press SPC s j, after searching is done, the index will be displayed on statusline. you can use SPC s l to list all the search results.

需要 登录 后方可回复, 如果你还没有账号请 注册新账号