-
Notifications
You must be signed in to change notification settings - Fork 390
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
Cant open "filename" for writing: name too long #3001
Comments
Before answering your question, let me help you with the config. I've cleaned it up, removed a lot of unnecessary stuff. E.g., you don't need to set things if you don't change from the default. Also, I also removed the comments, but feel free to add them back of course! return {
"lervag/vimtex",
lazy = false,
init = function()
vim.g.vimtex_view_method = "zathura_simple"
vim.g.vimtex_compiler_latexmk_engines = { ['_'] = '-lualatex' }
vim.g.vimtex_compiler_latexmk = { aux_dir = ".build" }
vim.g.vimtex_quickfix_mode = 0
vim.g.vimtex_mappings_enable = 0
vim.g.vimtex_log_ignore = {
"Underfull",
"Overfull",
"specifier changed to",
"Token not allowed in PDF string",
}
end
} |
Well, ok; can you please create a minimal example that will reproduce this problem? It's very hard to parse the error message to figure out what is wrong here. If this is just about the path name, then it should be simple for you to create such an example with very small tex files. |
on creating the mwe i noticed that the original file simply, as the error described, has a filename that was too long apparently 23 char is the limit for file size and since the file had 24 chars i got the error, no idea why tho, is this a bug? |
I've never heard of or experienced this myself and it does not feel like this should be a bug. So if you are able to make an mwe I could see if I can reproduce. |
OK here it goes the MWA, i added it to the nvim config file inside a directory with a very long name, its important as the long path is a problem. I must note that i added your config suggestions, thank you very much for that vimtex.lua...
vim.g.vimtex_compiler_latexmk = {
aux_dir = ".build",
options = {
"-shell-escape",
"-verbose",
"-file-line-error",
"-synctex=1",
"-interaction=nonstopmode",
}
}
... the tree
MWE.tex% \documentclass{article}
\documentclass[
class=article,
multi={minipage},
border={3mm},
]{standalone}
\usepackage{luacode}
\usepackage{xparse} % xparse - multiple optional arguments
\usepackage{calc}
\setlength\textwidth{160mm}
\usepackage[fontsize=12pt]{fontsize}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{subfiles}
\begin{document}
\section{main}
main file
\end{document} MWE-withaverylongassnameeeeeeeeeeeee.1.tex% !TEX root = ./MWE-withaverylongassnameeeeeeeeeeeee.1.tex
\documentclass["./MWE.tex"]{subfiles}
\usepackage{sections}
\begin{document}
\section{}
test
\end{document} |
Thanks; I've pushed an attempt at fixing this. It does feel like a hacky solution, but I believe it should work and that it should be robust enough.
Glad to help! |
Its compiling perfectly thank you very much! |
Great, glad to hear it! |
Description
When opening a new file i get the following error:
I should note
# !TEX root = root.tex
...long_file_name...
or...
they were just long names or paths to the file im trying to openSteps to reproduce
Have my configuration and try to compile a file with a long path i guess?
vimtex.lua
Expected behavior
Open the file normally with normal capabilities
Actual behavior
opening file as a text file, no highlights or completions
Do you use a latexmkrc file?
no
VimtexInfo
The text was updated successfully, but these errors were encountered: