Re: filetype detection within files
- Marc Weber wrote:
> I know about &ft.If I understand correctly, you want to know the currently active
> Talking about
> == a .html file ==
> <script type="javaoscript">
> Now I want a function which returnns "js" if cursor is in such a
> and snippet plugins.
> Same for any kind of "nested" languages such as php, haml, jsp etc.
effective filetype when a syntax group has been "included" in.
For example, from html:
In your example, the following vimL...
let idlist = synstack(line("."),col("."))
for id in idlist
could manually extract a list of such names and set up a dictionary
syntax files and build such a list, but I'd think that'd be
unnecessarily time consuming (as the syntax-include region names are
likely to be fairly static).
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