Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm an advocate of the <a href="https://github.com/LucHermitte/local_vimrc" rel="nofollow noreferrer">plugin way</a>. For several reasons:</p> <ul> <li>Modelines are particularly limited: we can't set variables (that tunes other (ft)plugins, like "should the braces of the for-snippet be on a newline ?"), or call function from them (I don't limit myself to coding standards, I also set the makefile to use depending on the current directory)</li> <li><a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow noreferrer">DRY</a>: with modelines, a setting needs to be repeated in every file, if there are too many things to set or tunings to change, it will quickly become difficult to maintain, moreover, it will require the use of a <a href="http://vim.wikia.com/wiki/Category:Automated_Text_Insertion" rel="nofollow noreferrer">template-expander plugin</a> (which you should consider if you have several vimmers in your project).</li> <li>Not every one uses vim to develop. I don't want to be bothered by other people editor settings, why should I parasite theirs?</li> <li>It's easier to ask vimmers to install a same plugin, instead of asking them to copy-paste, and maintain, the same lines in their .vimrc</li> <li>The settings can be saved with the other project files (cvs/svn/git/whatever)</li> <li>It's really easy to have a configuration file per project -- with the plugin, I have a global configuration file for the coding standards of the overall project, and specific configuration files for each sub-project (which makefile to use, which executable to call, ...)</li> </ul> <p>BTW, <a href="https://stackoverflow.com/questions/456792/vim-apply-settings-on-files-in-directory#456846">sth's solution</a> can be used to source a single configuration file. This is very similar to the plugin approach except the .vimrc has to be parasited with non global options, and it does not support easily multiple/shared configuration files.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload