2

Vim supports multiple file types for the main file formats. But this does not work for less popular formats such as LaTex and grapviz. Try it out for yourself, go here, copy paste the code into vim and try setting the file type to any permutation of .tex and .doc or .gv

Is there a way to inform vim that I am entering a different file type block? Something like

\author{John Smith}
\title{This is LaTex}

\*!setfiletype .gv!*\
digraph G{...}
\*!setfiletype .tex!*\

This is Latex Again
1
  • Ooo! Yes there is, check out having R and Latex in the same file with Sweave, I've seen vim syntax highlighting questions about those. Commented Feb 2, 2012 at 14:48

1 Answer 1

3

For this, you would need a custom Tex syntax file that includes Graphviz's syntax.

Both :help syn-include and this question/answer might help.

Or you may do things in a more straightforward fashion: edit Tex stuff in .tex files and Graphviz stuff in .gv files.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.