You are not logged in.

#1 2022-04-01 03:19:19

FrozenArcher
Member
From: Hangzhou
Registered: 2022-03-31
Posts: 16

[SOLVED] Can I split nvim's init.vim into multiple files?

I'm using init.vim instead of init.lua because I prefer VimPlug. I've migrated some plugin configurations into lua files but the init.vim continues to get larger. Does anyone have any idea?

Last edited by FrozenArcher (2022-04-01 08:16:11)

Offline

#2 2022-04-01 04:14:03

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: [SOLVED] Can I split nvim's init.vim into multiple files?

Every file you put in $HOME/.config/nvim/plugin will be sourced at startup, so you can split it up in various files and put them in there.

Or if you don't want to do that for some reason you can keep separate .vim files in arbitrary places and just in include them in your main init.vim with the source command:

source [/path/to/]subfile1.vim

Last edited by frabjous (2022-04-01 04:17:38)

Offline

#3 2022-04-01 08:13:12

FrozenArcher
Member
From: Hangzhou
Registered: 2022-03-31
Posts: 16

Re: [SOLVED] Can I split nvim's init.vim into multiple files?

frabjous wrote:

Every file you put in $HOME/.config/nvim/plugin will be sourced at startup, so you can split it up in various files and put them in there.

Or if you don't want to do that for some reason you can keep separate .vim files in arbitrary places and just in include them in your main init.vim with the source command:

source [/path/to/]subfile1.vim

that works. thanks.

Offline

Board footer

Powered by FluxBB