-
Notifications
You must be signed in to change notification settings - Fork 407
:VimtexTocToggle not working inside the TOC buffer #2317
Copy link
Copy link
Closed
Labels
Description
Description
When inside the VimtexTOC buffer, typing the :VimtexTocToggle commands returns the following error:
E492: Not an editor command: VimtexTocToggle
This is due to the fact that the VimtexTocToggle command is exclusive to tex filetypes (and it's derivatives such as rnw).
Since the toc buffer has no filetype( running :set filetype returned filetype=), I deduced this was the issue.
This is especially annoying when mapping a key to open and focus the TOC as it no longer works as a toggle
(ex: nnoremap <c-Tab> :VimtexTocToggle<CR><c-w>l).
Steps to reproduce
- Open a latex document
- Enter
:VimtexTocToggle - Enter
<C-w>l(or j if your split is horizontal) - Retype
:VimtexTocToggle - Enjoy!
Expected behavior
The Toc window disapears and the cursor returns to the previous tex buffer.
Actual behavior
ERROR:
E492: Not an editor command: VimtexTocToggle
Do you use a latexmkrc file?
No
VimtexInfo
System info:
OS: Artix Linux
Vim version: NVIM v0.6.1
Has clientserver: true
Servername: /tmp/nvimFTkUx2/0
VimTeX project: main
base: main.tex
root: /home/master/Dropbox/A/scholar/sherbrooke/s2/mat901/devoir-1
tex: /home/master/Dropbox/A/scholar/sherbrooke/s2/mat901/devoir-1/main.tex
main parser: current file verified
document class: article
packages: babel blkarray document fontenc multicol tabularx titlepage titlesec
compiler: latexmk
engine: -pdf
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 1
executable: latexmk
viewer: General
qf method: LaTeX logfileReactions are currently unavailable