sessionvimpanesneovim

Creating/Saving a Vim Layout


Everytime I open a project/directory I use the exact same vim pane layout:

 ---------
|    |pane|
|pane|pane|
|    |pane|
 ---------

I would like to be able to open a new vim session with this layout, all of the panes on the right would start in :Explore mode, while the left pane would start in :terminal mode (specific to neovim).

Is there any way to create a vim "layout" for a new session?


Solution

  • Try something like this:

    nvim -c ':vsp|Explore|sp|Explore|sp|Explore'
    

    Placing terminal in front is tricky because it steals focus.

    Now I got a idea.

    nvim -c ':vsp|Explore|sp|Explore|sp|Explore|wincmd w|te'