Is it possible to do searching in NERDTree window by the filenames and file content?
Ctrl + → arrow will switch to tab that is on the right of current tab.
If you want to use NERDTree, you can open NERDTree (type :NERDTree ), navigate to your file, and then press t with cursor on the file name. This will open specific file in new tab. Also, while in NERDTree , you can hit ? . That will show you it's internal help with list of available commands.
You can do /foo
like in any other normal Vim window but you are limited to the text currently displayed in NERDTree: you cannot search non-expanded subdirectories or non-listed files.
Assuming you are at the root of your project, you can do the following to search the word foo
in JavaScript files across your project:
:vim foo **/*.js | copen
Or the following if the "working directory" (:pwd
) is not the root of your project:
:vim foo /path/to/project/**/* | copen
Note the **
(:help starstar
) that makes the search recursive.
If you want to open app/views/foobar.php
for editing, you can do:
:e **/foo<tab>
Well, there are many ways.
Accessing files/buffers or searching across a project are relatively straightforward with native commands but there are quite a lot of third party plugins to make it even faster and easier. Ctrl+P is my favorite file/buffer finder plugin but you should get comfortable with the basics before turning to plugins.
Command-t in one of my favorite vim plugins, it's ruby based plugin above integration with FZF.
By using Comamnd-T and FZF you can do the search with an extremely fast "fuzzy" mechanism for:
As you can see
I always search in command history by opening a new terminal and hit:
CTRL+R
In addition to searching in all folders recursively by writing in any terminal tab:
fzf
Also, you can write inside vim
:CommandT
But Still, I am looking for a powerful vim plugin to search inside files content. especially in large folders. if I found one I will update this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With