开发者

Vim change configuration in folder viewing mode

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, l开发者_如何学Pythonine numbers set in it automatically.

How do i change the configuration for the folder viewing mode in Vim?


If the path you're referencing is a directory, vim will use its builtin filebrowser.

thus:

doSeomthing(mypath = '/home/nate/superAwesome|Project/')

with | representing the cursor, if one uses "gf", this will produce the same results as:

:e /home/nate/superAwesomeProject/

or

:Explore

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 gf to 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜