jaromero / neovim-config

neovim config
0 stars 0 forks source link

confusion about the startify #1

Open iiison opened 7 years ago

iiison commented 7 years ago

Hey @jaromero I recently have cloned your neovim-config for my neovim. I used to use CtrlP and few other small plugins before using your configs. Unlike startify, CtrlP simply opens the directory instead of opening a dashboard kind of page. When I navigate to my project, startify shows the tree structure of my project like this:

screen shot 2017-08-27 at 1 55 50 pm

and when I open any file in the project, that file will be opened in a new tab like this:

screen shot 2017-08-27 at 1 58 41 pm

Now my question is:

I am a little new to vim world, so my question may sound a little obvious(excuse me for that 😉)

jaromero commented 7 years ago

Those aren't tabs, they're buffers. Basically, each buffer represents a file you have opened and therefore you can have multiple splits (or "windows" in vim parlance) showing the same buffer at different locations: e.g. your left split shows the beginning of the file, while your right split shows the end, and modifying text in one split is reflected in the other since they're showing the same buffer.

(This also means that, naturally, every new file you open is going to show up in the buffer list.)

Tabs in vim are also quite different from tabs in other programs. I'm still learning how to use them, but this article might help understand the details better.

There are many ways of switching between them, :bp and :bn by default. In my config I've also set these up for navigating buffers a bit faster:

That screenshot you provide is the default netrw view that comes with (neo)vim by default, it has nothing to do with startify. I haven't done anything about it since the way I usually open projects is by doing it from startify itself (neovim without arguments, or :Startify), or by opening a file at the root of the project directly (and then opening more files from there, and possibly using startify's :SSave command to add it to its list of sessions).