How to create a list of files from vimrc?

Basically I want to add something like

source ~/.vim/source.d/*.vim

before vimrc.

Can I encode globbed fileset?

+3
source share
3 answers

Use the command :runtime!(including !).

:runtime! source.d/*.vim

This is how the plugin folder loads.

+3
source

Why don't you put them in your ~ / .vim / plugin / directory? He will also do his job transparently.

+4
source

Got the following answer on #vim:

exe join(map(split(glob("~/.vim/source.d/*.vim"), "\n"), '"source " . v:val'), "\n")
0
source

Source: https://habr.com/ru/post/1751840/


All Articles