Closed
Description
Description
I'm currently using a Windows 10 Laptop (No WSL) but the autocompletion for the following path sources appears to be using backslash "\" instead of "/":
- [include]
- [input]
- [includepdf]
- [includestandalone]
However, [graphics] source seems to be working fine
Currently as a workaround I've just modified the lines 478, 483, 504 and 525 from the file vimtex/autoload/vimtex/complete.vim
with the function substitute
to patch this behaviour:
\ 'word': substitute(fnamemodify(x, ':r'), '\\', '/', 'g'),
" or
\ 'word': substitute(x, '\\', '/', 'g'),
Steps to reproduce
- Minimal folder structure
~\test/..
images
└ stuff.pdf
src
│ firstsection.tex
└ secondsection.tex
main.tex
- Minimal latex file
\documentclass[a4paper, 10pt]{article}
\begin{document}
% The problem's with the following commands
\input{}
\include{}
\includepdf{}
\includestandalone{}
% This works fine
\includegraphics{}
\end{document}
Expected behavior
Autocompletion should use the '/' syntax for paths.
Actual behavior
Instead, autocompletion is using the traditional Windows '\' syntax.
Do you use a latexmkrc file?
No
VimtexInfo
System info:
OS: LAPTOP-H90H219I (Microsoft Windows 10 Home Single Language)
Vim version: NVIM v0.9.5
Has clientserver: true
Servername: \\.\pipe\nvim.32700.0
VimTeX project: main
base: main.tex
root: C:\Users\LUIS\test
tex: C:\Users\LUIS\test/main.tex
main parser: fallback current file
document class:
compiler: latexmk
engine: -pdf
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 1
executable: latexmk
viewer: General
qf method: LaTeX logfile