Questions tagged [plugin-vimtex]
Questions about the plugin vim-tex which provides enhanced TeX support for Vim.
91
questions
1
vote
1
answer
35
views
How to install VimTex on Neovim (NvChad) on Windows (not WSL)
Hi I’m trying to install VimTex in NvChad on Windows (not WSL), but I’m not sure what to do, the official Git page wasn’t of much help, and I’ve been stuck for hours.
I want to know what I must ...
0
votes
1
answer
117
views
How to hide keybinds in which-key.nvim depending on buffer type?
I have been refactoring my nvim setup. I manage my plugins with lazy.nvim. I have vimtex plugin, with following binds:
local wk = require"which-key"
wk.register({
l = {
name = &...
0
votes
0
answers
41
views
How do I stop the cmp-vimtex completion source from completing latex environments with an extra brace?
I have lua neovim config here. I wrote some latex snippets in luasnip; for example the snippet that makes a new environment is triggered by begin to produce
s({
trig = "begin",
name =...
2
votes
3
answers
93
views
LaTeX with UltiSnips: How to automatically insert backslash in front of every math variable?
I use LaTeX inside Vim with Vim-tex and Ultisnips. The majority of my snippets are those created by Gilles Castel. In one of his snippets, he writes the following:
priority 200
context "math()&...
2
votes
2
answers
65
views
How can I jump outside the scope of LaTeX delimiters?
I want to define insert mode mappings that will jump outside the scope of any delimiter I'm in (forward/backward). Where "delimiter" is in the broad sense of LaTeX delimiters, so not only {},...
2
votes
0
answers
33
views
Apply listchars to concealed text by vimtex
I am writing LaTeX with vimtex conceal feature, and need to distinguish between the regular space U+0020 versus the non breaking space U+00A0. Here is a minimal example to reproduce the issue.
\...
0
votes
0
answers
181
views
VimTeX: Viewer cannot find Zathura window ID! (Ubuntu 22.04 LTS x11)
The PDF file is not opening with Zathura after the VimTeX compilation. I am using https://github.com/benbrastmckie/.config and the file vimtex.lua in my directory ~/.config/nvim/lua/neotex/plugins ...
0
votes
1
answer
52
views
VimTex is nonstop compiling if gnuplottex is used
I am using VimTex to write LaTex. I am trying to use gnuplottex in my documents, but get the problem that VimTex won't stop compiling the tex file. I am guessing that some gnuplot related files are ...
0
votes
0
answers
78
views
Contextual Snippets not working in inline mathmode of vimwiki
I am trying to use the snippets in math context inside vimwiki filetypes. The math contextual snippets are working fine for ".tex" files, but not for ".wiki" files. However all the ...
0
votes
1
answer
435
views
Deoplete + Vimtex with Lazy.nvim. Deoplete is not triggered
I tried to migrate fomr packer.nvim to lazy.nvim and I encounter problem with deoplete. With packer is triggered on every document and .tex files. With Lazy.nvim is not.
I appreciate any help!
Here is ...
0
votes
1
answer
147
views
Neovim slow while compiling LaTeX [closed]
When I compile a .tex file using vimtex it takes a hot second to compile.
Following this post I obtained the profile.log while compiling latex [given below is just the sorted part]
FUNCTIONS SORTED ...
1
vote
1
answer
104
views
Migrating from Latex-Suite to vimtex
So I've been using latex-suite for a few years, and I realised recently that vimtex has some nice features (especially the text objects). So I'm tempted to use that instead, but it would require me to ...
1
vote
1
answer
62
views
VimTeX omnicompletion for bibliography
Problem with builtin omnicompletion for bibliography. It works on main.tex, but not in the chapters.
This is the tree structure:
├── chapters
│ ├── actors_behaviour.tex
│ ├── analysis_acts.tex
│ ...
2
votes
2
answers
935
views
Conceal comments in Vim/Neovim
I am writing a lot of latex and would like to conceal comments.
There are often several lines of text that I comment but would like to keep/not delete.
Concealing comments explained: A comment is ...
1
vote
1
answer
857
views
Setting custom global variables from command-line with `nvim` command
Occasionally I would like to override my standard nvim configuration, for example, to tell it not to load vimtex's folding configuration for a very large or complicated tex file for which I don't need ...
-1
votes
1
answer
473
views
vimtex#syntax#in_mathzone with tree-sitter and texlab
Vimtex provides the very useful family of functions vimtex#syntax#in_mathzone(), vimtex#syntax#in_comment() and vimtex#env#is_inside('...'), which come in handy for context sensitive snippets, e.g. ...
1
vote
2
answers
612
views
Vimtex - How to run :VimtexCompile on start using lua
How do I execute :VimtexCompile automatically whenever I open a .tex file? As mentioned in this GitHub thread, this is done in Vimscript via:
augroup vimtex_config
autocmd User VimtexEventInitPost ...
1
vote
1
answer
34
views
move (motion or visual selection) to own line and indent
Suppose I have the following text
\[
X = (a, b)
\]
I want to easily convert it to the following, including indentation:
\[
X = (
a, b
)
\]
Suppose my cursor is on a. How can I do ...
0
votes
2
answers
4k
views
Configuring VimTeX in NvChad config
I've been trying to configure vim-tex working on the NvChad configs. I got the :VimtexCompile working and giving me output pdf. But the usual <leader>ll is giving me these errors. Also in vim {{ ...
1
vote
1
answer
86
views
Change " to `` or '' depending on whether it's typed after a space or non-space
The usecase is LaTeX, which I write using VimTeX.
To make double quoted words one would write ``words''.
However, I'm much more used, from many other contexts (both prose and code), to type " for ...
0
votes
1
answer
156
views
How to toggle vimtex-log?
Here VimTex has a mapping for viewing the log. However, is open in a buffer that cannot be toggled, so I have to type: :bd to return to my text. This is not happening with error buffer where I can use ...
2
votes
1
answer
205
views
Why is there an ftplugin directory for each plugin?
I am trying to get started with VimTeX. I am reading through a guide (https://www.ejmastnak.com/tutorials/vim-latex/vimtex.html) and using vim-plug to manage plugins. I am very new to Vim generally, ...
1
vote
1
answer
648
views
Vimtex and latexmkrc config. Question about compiling
I didn't understand very well this part, since English is not my native language.
LATEXMK *vimtex-compiler-latexmk*
As stated, one may customize the `...
1
vote
1
answer
74
views
Concealing ~ in texvim + conceal
I tried
syn match texStatement '\\\[' contained conceal cchar=⟦
syn match texStatement '\\\]' contained conceal cchar=⟧
syn match texStatement '\\~' ...
2
votes
1
answer
283
views
Autocomplete LateX citations in chapters directory
Currently writing my thesis using LateX, I'm trying to obtain autocomplete on my citations when writing the chapters. The directory structure is that each chapter has its own main.tex files (template ...
1
vote
1
answer
1k
views
vimtex: how to switch latex engine dynamically
I now use vimtex to edit my latex source files.
Usually, I use the xelatex engine.
So I have the following line at the beginning of my .tex file.
% !TeX program = xelatex
Sometimes I need to switch ...
0
votes
1
answer
190
views
vimtex: configure to indent '[ ... ]' and '\[ ... \]' blocks
When setting indentation using vimtex, I meet some problem.
I set the option g:vimtex_indent_delims to indent [...] blocks.
let g:vimtex_indent_delims = {
\ 'open' : ['{','(','['],
\ '...
1
vote
1
answer
228
views
vimtex: Avoid aligning in align environment in the document
So I'm using vimtex, and it's great, but there is one thing that is so annoying and I cannot believe that people actually use that feature.
Namely, say I write something like
\begin{align}
x &= ...
1
vote
1
answer
156
views
vimtex: fully indent a '{ ... }' block
Concerning indent in vimtex, it has some settings controlling indenting of delimiters, the option seems to be g:vimtex_indent_delims. However, I would like to not only indent the text between opening ...
0
votes
1
answer
66
views
Key mapping for converting `((` to `\left( | \right)`
I would like to have something in .vimrc where when I type (( in insert mode, it automatically converts that into \left( | \right) with the cursor position at | in insert mode. Any ideas?
I also would ...
1
vote
1
answer
129
views
vim command for jumping to <++>
I recently moved from vim-latex-suit to vimtex.
In vim-latex-suit, there was this awesome feature that when I press Ctrl-j, it jumps to where <++> is and replace that to the cursor.
To clarify,
...
0
votes
0
answers
39
views
Cursor get stuck at the statusline bar when saving a .tex file (probably due to vimtex)
To preface this, I'm relatively new to vim, and I'm using Windows Subsytsem for Linux, and the Windows Terminal if this makes any difference.
So whenever I'm editing a .tex file and want to save, ...
0
votes
0
answers
335
views
Using VimTex "in_mathzone()" in .tid files
I am writing files with the extension ".tid" for a piece of software called TiddlyWiki whose syntax is pretty similar to that of markdown. In these files, I want to be able to write down ...
1
vote
1
answer
811
views
Wrapping text in environment vimtex
I use vimtex although I am by no means an expert in Vim, so it may be that I'm missing something obvious. Anyway, I am looking for functionality similar to that of 'cse, csc, csd' (which change the ...
1
vote
0
answers
128
views
:PlugUpdate is required every time I open vim [closed]
I’m setting up my LaTeX environment for vim, but the snippets (Ultisnips + vim-snippets + Gilles Castel’s tex.snippets with some changes) only work after I run :PlugUpdate (using vim-plug). I have to ...
1
vote
1
answer
282
views
(coc-)vimtex .bib completion strange suggstions
I've noticed that (coc-)vimtex gives suggestions about bib(la)tex keys and allows too searching in the entries of the literature.
Now this search works sometimes for me, sometimes not (see the gif). ...
1
vote
1
answer
1k
views
Vimtex+YouCompleteMe: How to disable autocompletion on plain text?
I have recently setup vimtex and YCM as the associated autocompleter. These work great in their intended scenario, however I believe the autocompleter is giving suggestions when I am typing plain text ...
1
vote
1
answer
269
views
Vimtex: `latexmk` compiler gives "no file name specified" error even after a new buffer is written to a file
When I open a new instance of vim without any 'filename' argument and write some LaTeX code, I cannot just compile it to pdf with latexmk, because it needs a file to compile from. However, even after ...
0
votes
0
answers
2k
views
How to get zathura to appear inside terminal and autocompile
I'm pretty new to vim and linux in general. I've been wanting to use vim for writing my math latex notes in the same fashion as pictured below.
Whereas currently I am only able to accomplish the ...
1
vote
1
answer
1k
views
xelatex as default latex engine
I am new to vim and I am currently working with the default configuration of vimtex other than setting my viewer to skim. Here is what \li produces with my current vimtex configuration (used a minimal ...
1
vote
0
answers
80
views
vimtex-compiler-ss does not open quickfix
Due to my muscle memory(aquired from vim-latex and other code compilation, so <F10> is universal compiler for me), I prefer singleshot calculation. I do have given a shot to \ll and then just ...
3
votes
1
answer
661
views
Contextual Snippets in UltiSnips not working
I have been using vimtex with UltiSnips for a while on Linux platform and it has been working just fine.
Recently, I switched to MacBook Air M1 for the same and installed the above mentioned plugins ...
1
vote
1
answer
575
views
Is it possible to setup vim to use vimtex for Rmd files?
I need to write Rmd files, but I can't imagine life without vimtex. Is there a way that I can use vimtex with Rmd files? Ideally, I would also like to keep the syntax highlighting that I have for Rmd ...
1
vote
1
answer
143
views
Latex: smaller Greek letters in math mode
In init.vim, I use vimtex and text-conceal, but it seems Greek letters and math operators look smaller. Here is an example:
But when the cursor moves away, the math mode looks like this:
.
From this, ...
0
votes
1
answer
86
views
Display the same color for all characters in a math section
In a tex file, almost all the characters inside delimiters like $...$ or \[...\] have the same color, but there are some characters, like = (and possibly others) which have a different color. I would ...
2
votes
2
answers
1k
views
vimtex conceal options and character substitution not working on Windows
I wanted to write and edit a .tex document as fast as possible, so I followed this guide, but I can't get vimtex to work properly. I would like to have Vim hide characters like $,\[ and replace some ...
0
votes
0
answers
138
views
Eliminate highlighting of rendered code in vimtex
I am trying out vimtex and I think it is great but I am annoyed because the rendered code looks highlited or selected. I attach a picture that shows what I am talking about. At first I thouhgh it may ...
1
vote
0
answers
278
views
Vimtex in Spacevim: conceal persists even on cursor line
I am new to (space)vim and I tried to make vimtex work in spacevim.
Following the documentation, I added the layer:
[[layers]]
name = 'lang#latex'
in init.toml. Opening a .tex document then the math ...
3
votes
1
answer
3k
views
Manually disable scripts(/plugins) during a session?
Sorry if this is a noob question(I'm new to configuring vim) but I was wondering if it is possible to disable startup scripts manually during a Vim session. I am aware of the :scriptnames command ...
1
vote
1
answer
76
views
Vimtex citation movement bindings
By default <c-x><c-o> opens all citations/references in vimtex, then pressing tab goes over all citations/references backwards. How do I set plugins that make tab go forward? I tried but ...