Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Location-dependent vim settings

Tags:

vim

macvim

I work on multiple software projects that have different style conventions. Is it possible for vim to automatically change its settings (e.g. indentation) depending on the directory a particular file lives in?

like image 336
xvtk Avatar asked Sep 01 '26 17:09

xvtk


1 Answers

No

Vim doesn't have any settings appropriate for what's described.

But there's a plugin for that

However, you may find a plugin that does what you want for example vim-independence:

The plugin is automatic, if the file .vimrc exists in your git project root - it will load it.

(full disclosure: I wrote that script)

like image 157
AD7six Avatar answered Sep 04 '26 10:09

AD7six



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!