How to include one vim configuration file in another?

Asked

Viewed 55 times

2

I am reorganizing/redoing my vim configuration files and would like to leave different language settings in separate files.
Something like that:

.vimrc
.vimrc.python
.vimrc.ruby
.vimrc.cpp
.vimrc.js
...

I don’t need language settings to be loaded only for that type of file, they can all be loaded at the same time. I’d just like to leave them in separate files, easier to organize and all that.

How would a "include" from one configuration file into another?

1 answer

4


You can use the command source to call other configuration files, just put in your main configuration file (.vimrc) the following:

source ~/.vimrc.python
source ~/.vimrc.ruby
source ~/.vimrc.cpp
source ~/.vimrc.js
  • Exactly what I needed! Thanks!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.