Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [filetype-tex]

For questions on editing TeX documents, either with or without a frontend such as LaTeX.

Filter by
Sorted by
Tagged with
3 votes
3 answers
100 views

How to insert LaTeX commands and matching braces repeatedly?

I sometimes have to insert again and again commands such as: \onslide<->{ SOME TEXT } when I create beamer presentations and I wonder if the vim-surround plugin could facilitate (a lot!) the ...
user22744's user avatar
2 votes
1 answer
35 views

Configure space using gc in LaTeX

Using the new gc feature in Neovim 0.10, is there a way to configure how the adding comment is done, like "add comment symbol followed by space" instead of "add only comment symbol"...
Vincent's user avatar
  • 23
2 votes
3 answers
82 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()&...
Ian McGettigan's user avatar
2 votes
2 answers
62 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 {},...
Ur Ya'ar's user avatar
  • 127
1 vote
2 answers
79 views

Vertically center the cursor on soft-wrapped lines

When writing LaTeX, I try to stick to one sentence per line to make my text work well with diffs, as is commonly accepted practice. Because I have to use a very large font size, nearly every sentence ...
TheGiwi's user avatar
  • 47
1 vote
1 answer
685 views

LaTeX plugin for editing in nvim

I have moved from Emacs to Neovim and are trying to make my life easier while editing LaTeX documents. One of the things I liked above Emacs's LaTeX plugin was the ability to white "word" ...
user3236841's user avatar
4 votes
1 answer
228 views

How is filetype tex and plaintex set in vanilla Vim?

I noticed that when I create a .tex from within Vim itself, in a later session that file is detected as plaintex, while already existing files are detected with the tex filetype (note: both of them ...
mEm's user avatar
  • 157
1 vote
0 answers
192 views

Neovim+texlab+Skim configuration

Trying to make forward and inverse search work but I'm not sure how to modify my configs. I am currently using this plugin to try and make it work, but I am not sure where to put the lines that - they ...
Dalamar's user avatar
  • 111
1 vote
1 answer
91 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 ...
Ronak M Soni's user avatar
1 vote
2 answers
539 views

How can I ignore default filetype indenting?

Can I tell Neovim not to load a bundled indentation file? For example, when I edit a .tex file, "share/nvim/runtime/indent/tex.vim" loads automatically. I don't want those settings. Do I ...
Alan's user avatar
  • 123
1 vote
0 answers
23 views

How to add a syntax rule to LaTeX filetype?

How can I colorize elements of the regex rule "\w\+:\w\+:\d\{4\}" in a LaTeX file ? If I open a new document with no filetype and add the two following command : syn match Bib3Dots '\w\+:\w\+...
chuugar's user avatar
  • 11
4 votes
1 answer
306 views

How to turn off auto indenting while editing a LaTeX file?

I edit a LaTeX file, and for some commands Vim does auto indenting. I would like to switch it off. Consulting: https://www.serverwatch.com/guides/automatic-indenting-vim/ I tried: :filetype indent off ...
Gergely's user avatar
  • 293
-1 votes
1 answer
426 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. ...
Gargantuar's user avatar
1 vote
2 answers
162 views

Editing .bib files in (n)vim with tailored autocompletion

I use BibDesk on a Mac to edit .bib files (in biblatex, using biber to compile). This generally works, but for various reasons it would be nice to be able to edit them in nvim too. My current setup ...
Alex Roberts's user avatar
0 votes
0 answers
68 views

UltiSnips Latex snippet does not work correctly when wrapped around due to textwidth setting

Given snippet: snippet mm "Inline Math" wA \\( $1 \\) $0 endsnippet which inserts inline math mode in LaTeX: \( | \) where cursor position is | and following .vimrc: "-------------Load ...
Tryer's user avatar
  • 247
0 votes
1 answer
40 views

What other than mappings and abbreviations can change the text I'm typing?

The question When editing TeX files (to do so, I use vimtex) if I've discovered that if I write lll in insert mode, I get \ell. How do I find why this is happening? My research I thought "ok, I'...
Enlico's user avatar
  • 2,244
2 votes
1 answer
29 views

Why does iskeyword contain colon for TeX files? And where is it set?

From iskeyword's doc I read that its default on Linux is @,48-57,_,192-255. However, when I open a *.tex file, echo &iskeyword gives @,48-57,_,192-255,:. Where in the startup of Vim is that : ...
Enlico's user avatar
  • 2,244
0 votes
1 answer
83 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 ...
Enlico's user avatar
  • 2,244
-2 votes
1 answer
38 views

What is `<++>`?

In the example in this question, and in the latex-suite documentation, what is <++>?
wobtax's user avatar
  • 109
1 vote
0 answers
26 views

Strange behavior: latex-suite, alt-key macros, adding <++>. How can I disable this?

I’m using vim with the latex-suite plugin, on Ubuntu 22.04.1 LTS. (I installed the plugin through the Ubuntu package manager, i.e., through sudo apt install vim-latexsuite, then followed the ...
wobtax's user avatar
  • 109
1 vote
0 answers
39 views

lstlisting environment it not treated as verbatim, which results in several false positives

ALE does not treat text inside of listing environments like verbatim, which spawns many whitespace related errors (i.e. space before punctuation marks, etc.). I've found somewhat of an answer on ...
user avatar
0 votes
0 answers
138 views

Neovim recognizes LaTeX class files (.cls) as filetype=st

When I run nvim test.cls (a LaTeX class file looking something like this: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{landscapetest}[forcing landscape mode] \LoadClass[landscape]{article} \RequirePackage[...
Sam's user avatar
  • 101
1 vote
1 answer
121 views

Ultisnips dynamic tabstop generation with custom justified option

It seems possible to have ultisnips produce a dynamically sized array as specified here: https://github.com/SirVer/ultisnips/blob/master/doc/examples/tabstop-generation/README.md The array environment ...
Tryer's user avatar
  • 247
2 votes
0 answers
315 views

vim-fugitive support for diff --color-words

I use vim and git primarily for editing prose documents in LaTeX or Markdown, not for coding. For this reason, my go-to git diff command is git wdiff, where the relevant part of .gitconfig reads ...
Alex Roberts's user avatar
1 vote
1 answer
73 views

Concealing ~ in texvim + conceal

I tried syn match texStatement '\\\[' contained conceal cchar=⟦ syn match texStatement '\\\]' contained conceal cchar=⟧ syn match texStatement '\\~' ...
Yossi Gil's user avatar
  • 755
2 votes
1 answer
1k views

Vimtex not opening SumatraPDF automatically

I am using Vim 64 bit and have installed Vimtex on Windows 11. I can compile a LaTeX file and changes are shown in the pdf file, but typing \lv does not open my pdf viewer, SumatraPDF. Here is part ...
Sony's user avatar
  • 51
7 votes
1 answer
1k views

Why does Vim highlight "in" in tex files and how can I stop it?

I write a lot of LaTeX. In plain text mode, sequences like 123 in are highlighted in red. That is a space, a digit string, a space, and then the specific word in. Such things as a1 in are not ...
Bruce's user avatar
  • 205
3 votes
1 answer
150 views

Why is my # mapping behaving oddly in TeX files?

I recently made the following key-map in my .vimrc file: inoremap # \ inoremap \ # since I just want to switch those two key on my keyboard, everything works just fine until I notice this: Only in ....
Yuanhao JIANG's user avatar
1 vote
1 answer
44 views

Odd behaviour when pressing Tab with this mapping

I am trying to map ctrl+shift+i to insert an italics command in LaTeX files, and here's my attempt: autocmd BufNewFile,BufRead,BufWrite *.tex inoremap <buffer> <c-I> \textit{}^[i I am ...
Alvaro Neto's user avatar
2 votes
1 answer
260 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 ...
Jeanot's user avatar
  • 23
2 votes
1 answer
1k views

Is it possible to render just math equations in real time?

I have been using neovim to write LaTeX/Markdown for a while and it brings really great experience. Since I usually write equations, I'm wondering is there any plugin to render and just render math in ...
iChunyu's user avatar
  • 123
1 vote
1 answer
85 views

VIM and UltiSnips delay with pound "#" key

Consider the following snippet context "math()" snippet "([a-zA-Z])#" "Vectors" riA \mathbf{`!p snip.rv=match.group(1)`} endsnippet The expected behaviour is that if I ...
Maths Wizzard's user avatar
1 vote
1 answer
51 views

Certain LaTeX not displayed in GVim

I use conceal and write some LaTeX files in the GVim 8.2 editor on windows. The conceal works fine most of the time but it is unable to display certain characters like ∈ and ⊆. It shows a box with a ...
MATHS MOD's user avatar
  • 113
1 vote
2 answers
110 views

Disabling automatic imap of "< |" to "\bra{" (using neovim + vimtex)

In LaTeX, I'm trying to write if \(|x - a| < \delta\) then ... but in math mode, the combination < | is automatically replaced by x \bra{. I've been editing tex files with neovim for years, and ...
akm's user avatar
  • 121
2 votes
1 answer
125 views

Manage syntax groups in Vim Latex (how to create new ones, or add to existing ones)?

I'm trying to optimize for my needs the syntax highlighting offered automatically by Vim for Latex. For example by changing colors to my liking or link colors to new commands/environemnts. After a ...
Kore-N's user avatar
  • 143
0 votes
1 answer
372 views

Turn off concealed text not working properly

So basically, I'm testing out writing a Latex document in neovim. I want to make this as similar as an IDE as possible, but with some added Vim functionality. That includes having text that I'm ...
qmack's user avatar
  • 3
1 vote
1 answer
128 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, ...
Tom's user avatar
  • 379
0 votes
0 answers
104 views

Ignore spell check for LaTeX commands with multiple arguments

I have read through a lot of the posts on spell checking LaTeX syntax - here, here, and here. I am sure the problem is my lack of regex understanding, but I am having trouble configuring it so that ...
Paul's user avatar
  • 146
0 votes
1 answer
117 views

Shell script runs multiple times, I want it to run only once

I use vim pretty extensively for latex compiling. I've a function which automatically compiles the current tex file. I use pdflatex as a compiler, which creates a bunch of different files that it ...
nikinbaidar's user avatar
3 votes
1 answer
248 views

LaTeX: turn off text wrap and auto indent in maths environments

I use vim with vim-latex for editing latex files. I always have hard wrapping enabled using set tw=80. I also have the default vim-latex auto indent settings enabled. I wonder if there is a way to ...
chaffdog's user avatar
  • 131
0 votes
1 answer
174 views

vim/vim-latex: spell-check highlighting breaks after occurrences of \end{center}, \end{enumerate}, \end{itemize}

The highlighting of misspelled words in my LaTeX documents breaks, when I open a .tex file and jump to the bottom instead of scrolling through the whole document. Only .tex files seem to be affected, ...
user11718766's user avatar
1 vote
1 answer
770 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 ...
Lockjaw's user avatar
  • 145
1 vote
0 answers
125 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 ...
Sage Stark's user avatar
4 votes
1 answer
235 views

LaTeX dollar signs confuse syntax highlighting

I am editing LaTeX code such as: \documentclass{article} \usepackage{booktabs,tabularx} \begin{document} Blah blah Blah blah \begin{table}\centering \begin{tabular}{>{$}l<{$}p{4in}} %...
user2153235's user avatar
1 vote
1 answer
1k views

Setting conceallevel in .vimrc does not work in .tex file

I've set conceallevel=0 in .vimrc, but the text is not shown normally after opening .tex file. I have to type it again while the file is open and it works. From my .vimrc: "vimtex config set ...
Dominik Lenda's user avatar
0 votes
0 answers
28 views

snippets visual is not selected when there is overfull warning

Disclmair: this is a question about using vim to write LaTeX. I don't know if this behaviour is visible in other languages also. I use Ultisnips with honza/vim-snippets to expand latex snippets. If ...
BaRud's user avatar
  • 491
1 vote
1 answer
60 views

Running pdflatex using a key mapping

I have a latex file which includes multiple figures. These figures are kept in different directories whose path is given in the latex file using the graphicx package: \usepackage{graphicx} \...
Salil's user avatar
  • 11
0 votes
0 answers
54 views

Personalizing Vim-Latex reference \ref completion

Vim-Latex is a very big plugin, but the only reason why I use it is that it can complete references \ref{.. and citations \cite{.. I recently created my own latex equation environment, which usually ...
Kore-N's user avatar
  • 143
1 vote
0 answers
165 views

I would like to set the math direct display mode in vim as seen in Sublime Text 3

When I write mathematical formulas of any kind, the vim editor displays them and transforms them into a more readable format, see here: https://github.com/KeitaNakamura/tex-conceal.vim (the images ...
Antonello's user avatar
1 vote
1 answer
566 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 ...
evencoil's user avatar
  • 245

1
2 3 4 5