I make visible all hidden files and folders, also, .git
folders and files (.git
, .gitignore
and etc.)
In a project tree when using NERDTree
in Vim, I wanted to manage to show all other hidden files except .git
folder and its subfolders and files.
How I can do it?
Actually, the question post wants to show all hidden files and folders but ignore some files or folders like .git
folder. for this setting:
.vimrc
file and at the end of file insert the following command:let NERDTreeShowHidden=1
.vimrc
file again and the end of file insert the following command too:let NERDTreeIgnore=['\.git$']
Hint: recently I migrated from VSCode
and WebStorm
to Vim
so on the second step I ignore some other files and folders, I mean:
let NERDTreeIgnore=['\.git$', '\.idea$', '\.vscode$', '\.history$']
Press Shift+I
when in the NerdTree window
It worked for me. Did you try the following options ?
let NERDTreeShowHidden=1
Maybe you are not at the root of your git repo and that is why you don't see any .git* files/dirs
Just add the following to your .vimrc
file:
let NERDTreeIgnore=[".git"]
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