Download the source codeGithub.com/ncgrep/ncgr…
background
As a VIM party, I often use grep for keyword search in daily work development to locate files quickly. As shown in figure:
Use grep for text search
However, there are two efficiency problems with this process:
- The displayed results cannot be directly exchanged. You need to manually paste the file path before opening it
- The results presented are not grouped and are listed directly
As you can imagine, it can be painful to search for content with a large result set.
How about using the Ag plugin in Vim?
Yes, but he only solved the problem of interaction. The pain point of result set grouping and classification is still not resolved.
Text search using AG under VIM
Train of thought
When using an IDE such as Eclipse for text global search, there are great advantages in loading effects (lazy loading) visualization.
Do a global file search under Eclipse
Well, expect a similar search tool based on Linux. The advantages (functions) are as follows:
- Result sets can interact directly
- Result sets can be presented in groups
- Result sets are loaded lazily
What is a text-based graphical interface class library? Online about VIM, HTOP similar software, which are based on a class library called Ncurses implementation.
project
Name of the project: ncgrep
Why is that? Because there are ngrep, egrep, etc. (Note: ncgrep does not quote grep source code)
The Demo project
ncgrep demo
code
Similar projects
NGP youtube -> https://www.youtube.com/watch?v=MesYBY8271s
conclusion
Tools are built for efficiency and are expected to deliver benefits.
Text search tool NCgrep based on Text Graphics (Ncurses)