When I enter a folder in vim by pressing gf while over a path,
I enter some kind of folder viewing mode.
I don’t have for instance, line numbers set in it automatically.
How do i change the configuration for the folder viewing mode in Vim?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the path you’re referencing is a directory, vim will use its builtin filebrowser.
thus:
with
|representing the cursor, if one uses “gf”, this will produce the same results as:or
which will explore the directory of the path the current buffer is in.
There are a number of plugins available which show different views for directories (most notably perhaps, NERDTree), but the default file explorer is simply what it is. To my knowledge, there’s no way to change this behavior, aside from mapping
gfto another function or command.for more information on the default file explorer, try
:help :Explore, which shows the options of doing things like opening the explorer in a split, a new tab, seeing file information, etc.