Thursday, April 7, 2016

Re: How to detect the file type in vimrc?

Hi,

> Indeed, I'm pretty sure the file itself hasn't been read yet when
> reading the .vimrc, but I may be wrong about that.

Worse. When you open a second or a third file, the .vimrc isn't read anymore.

.vimrc settings are meant to be global settings that can apply to anything.

When we want dedicated settings, this is best done in ftplugins (when the variability is over the filetype). If it's over projects/directories, check for one of the local_vimrc plugins.
Otherwise, there are indeed autocommands, but they'll clutter the .vimrc with non global stuff.

--
Luc Hermitte

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: