Questions tagged [plugin-vimtex]
Questions about the plugin vim-tex which provides enhanced TeX support for Vim.
84
questions
0
votes
0
answers
52
views
Contextual Snippets of UltiSnips not working in vimwiki files
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
57
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
55
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
36
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
34
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
433
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
222
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
217
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. ...
0
votes
0
answers
21
views
vim (8.2) "freezes" when :VimTexCompileSS is used (I need to write CTRL+C to make it work again)
I am using vim with vimtex, to use the background compilation.
When I use the command :VimTexCompileSS, I am then unable to write anything on vim, unless I press CTRL+C to stop it. To click on the ...
1
vote
2
answers
416
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
31
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
2k
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 {{ ...
0
votes
1
answer
54
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
73
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
125
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
324
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
56
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
151
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
756
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
141
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
168
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
139
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
64
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
112
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
38
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
302
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
504
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
119
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
262
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
889
views
Vimtex+YouComplteMe: 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
223
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
77
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
615
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
498
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
111
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
73
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
130
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
268
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 ...
2
votes
1
answer
2k
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
68
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 ...
0
votes
1
answer
1k
views
How to set a command as a file type specific autocommand
I would like the :Toc command to call :Voom in R markdown files and :VimtexTocOpen in latex files.
First try:
au BufRead,BufNewFile *.Rmd command! Toc Voom
au BufRead,BufNewFile *.tex command! Toc ...
1
vote
0
answers
149
views
Conceal with the highlighting of matching begin/end latex environment
I want to use vim conceal feature with the highlighting of matching begin/end latex environment (vimtex plugin). When I use the following code
syn match texStatement '\\begin{itemize}' contained ...
3
votes
1
answer
133
views
Disabling `kana/vim-textobj-entire` by filetype autocommand
kana/vim-textobj-entire creates text-obejcts ae and ie which stand for the entire buffer. But in lervag/vimtex ae and ie stand for an environment in a .tex file. vimtex's ae and ie mappings are much ...
1
vote
1
answer
69
views
UltiSnips not substituting text properly
I am trying to define a snippet which substitutes text in multiple places. As a trivial example see the following which works for me :
snippet abc "Testing" bmA
\begin{${1:text_here}}
$0
\end{${1:...
0
votes
1
answer
221
views
Indentation is slow in vimtex
If you try to indent a moderate size .tex file (~ 3,000 words/500 lines) using the normal mode command gg=G, vimtex seems to take some time. However LaTeX-Box seems to indent faster. I didn't ...
0
votes
0
answers
238
views
GVim extremely slow with plugins for long docs
I am using gvim with vimtex (this) with UltiSnips (this) and with conceallevel set to 2.
I use the above set-up to write my LaTeX documents. In general, this is slow but if my document is large then ...
2
votes
1
answer
372
views
Concealing the code for `braket` package for LaTeX with vimtex + `tex-conceal`
I am using vimtex with latexmk and using conceal setting provided by vim and extending it with an additional plug-in : KeitaNakamura/tex-conceal.vim. Additionally, I use a package braket to encode \...