LaTeX-Box-Team/LaTeX-Box — pull request #11 by drfrogsplat (2012-03-20 06:54:28+00:00)
Title: Added detection of main.tex using *.tex.latexmain file

This method is copied (possibly stolen) from the Vim-LaTeX-Suite plugin.
http://vim-latex.sourceforge.net/

I find this a very easy + useful way of automatically detecting the main.tex file.

To be a bit more specific,, the "findmain.vim" file was lifted from the file "main.vim" in the Vim-LaTeX-Suite project.

That project is released under the same licence as vim, i.e. Charityware, which is GPL-compatible. I have not spoken to anyone in the project about this, so if this is something you actually want to merge in, then you may need to consider the compatibility of your licence with theirs, and/or just ask them if you can use this lifted code...

It could probably also do with a bit of clean-up, but it seems to work as-is (I'm not really much of a vim plugin guru, so apologies if its a bit hacky!)