You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mattboehm sent me a simplate.vim in private email following a conversation at PyOhio:
I thought I'd take a stab at getting a vim syntax file working for aspen, since you mentioned it to me during PyOhio.
The attached file seems to cover the basic case (2 Python sections and 1 other section. I used html for convenience, but I suppose the actual default is a different templating language.) It requires that the syntax files for python/html be in the same directory so that it can import them.
It's somewhat hackish and extending this to support all possible simplate files would be a non-trivial effort. Still, hopefully if you choose to revisit this problem, my example provides some help.
It's worth noting that even if the syntax did work perfectly, other vim behavior that is filetype-specific (abbreviations, snippets, filetype-specific plugins, etc.) would not work out of the box. When people do want all this functionality in a file of mixed types, I usually point them towards https://github.com/chrisbra/NrrwRgn .
let main_syntax='simplate'syntaxinclude@Py<sfile>:p:h/python.vimsyntaxinclude@Html<sfile>:p:h/html.vimsyntaxregionthirdBlockstart=_\[---]_end=_\%$_contains=@HtmlsyntaxregionfirstBlockstart=_\%^_end=/^\[---]/me=e-5contains=@PysyntaxregionsecondBlockstart=_^\[---]_end=_^\[---]_me=e-5contains=@Pynextgroup=thirdBlock"syntax region firstBlock start=_\%^_ end=/^\[---]/re=e-5 contains=@Py"syntax region secondBlock start=_\[---]_ end=_^\ze\[---]_ contains=@Py nextgroup=thirdBlock
The text was updated successfully, but these errors were encountered:
@mattboehm sent me a simplate.vim in private email following a conversation at PyOhio:
The text was updated successfully, but these errors were encountered: