Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect more TeX-related filetypes #2163

Closed
clason opened this issue Sep 9, 2021 · 5 comments
Closed

Detect more TeX-related filetypes #2163

clason opened this issue Sep 9, 2021 · 5 comments

Comments

@clason
Copy link
Contributor

clason commented Sep 9, 2021

Now that VimTeX is a full-featured filetype plugin, it would be nice if it triggered for (more) TeX-related filetypes.

Off the top of my head:

  1. *.cls: that is recognized by ftplugin.vim, but only if the first line starts with a % (otherwise the filetype is set to st); if you have VimTeX installed, chances are good that your .cls files are LaTeX class files...
  2. *.tikz (see Add .tikz file completion for \input #2162)
lervag added a commit that referenced this issue Sep 10, 2021
@lervag
Copy link
Owner

lervag commented Sep 10, 2021

I believe this may suffice. Please test.

I'm not 100% sure if it is a good idea to override the builtin conditional for cls filetype detection. I don't know and use smalltalk, and so I don't know how likely it is for this change to lead to unexpected behaviour...

@clason
Copy link
Contributor Author

clason commented Sep 10, 2021

I believe this may suffice. Please test.

Looks good!

I don't know and use smalltalk, and so I don't know how likely it is for this change to lead to unexpected behaviour...

I don't, either; I guess we'll find out whether the intersection of TeX writers and smalltalk programmers is nonempty...

@lervag
Copy link
Owner

lervag commented Sep 10, 2021

I don't, either; I guess we'll find out whether the intersection of TeX writers and smalltalk programmers is nonempty...

Hehe, yes; let's take the risk. If there are objections, then I'll probably revert this change. In the meantime, I'll close this issue. :)

@Hans-Guenter
Copy link

In my case I see a conflict with Visual Basic class files which also share the extension .cls.

@lervag
Copy link
Owner

lervag commented Oct 29, 2021

Let's have the discussion at #2226.

Repository owner locked as resolved and limited conversation to collaborators Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants