I suspect the editor recognition of file names used for \subimport
is hopeless, because the leading portion of the path is implicit. Some different input syntax for \import
and \includefrom
might allow the editor to recognize files.
\makeatletter
\newcommand\keeppath[2]{% #1=\input or \include. #2=file path and name
\begingroup
\ifx\input#1\relax \def\7{\noexpand\import}\else
\ifx\include#1\relax \def\7{\noexpand\includefrom}\else
\def\7{\noexpand#1}\fi\fi % probably should be error
\filename@parse{#2}% get \filename@area, \filename@base, \filename@ext
\edef\8{\7{\filename@area}{\filename@base %
\ifx\relax\filename@ext\else .\filename@ext\fi}}%
\expandafter\endgroup\8}
Then use \keeppath\input{foo/bar}
instead of \import{foo/}{bar}
and use \keeppath\include{foo/bar}
instead of \includefrom{foo/}{bar}
.
Maybe I should add this alternate syntax to import.sty. Test it well, and if it is good, I will add it.