Questions tagged [filetype-tex]

Questions about editing Tex documents, either with or without a frontend such a LaTeX.

Filter by
Sorted by
Tagged with
1 vote
1 answer
242 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
210 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
  • 143
1 vote
0 answers
103 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
59 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
241 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
0 votes
0 answers
162 views

How to display LanguageTool suggestions with neovim

I want to see LanguageTool suggestions (not just errors) when using LanguageTool with my LaTeX documents. LanguageTool can output the Error, Context, and Suggestion. However, with my setup (ltex-ls ...
nikost's user avatar
  • 101
4 votes
1 answer
232 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
286 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
0 votes
0 answers
26 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 ...
user8622655's user avatar
1 vote
2 answers
137 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
54 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
39 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,184
2 votes
1 answer
28 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,184
0 votes
1 answer
69 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,184
-2 votes
1 answer
38 views

What is `<++>`?

In the example in this question, and in the latex-suite documentation, what is <++>?
Sophie Weigle's user avatar
1 vote
0 answers
21 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 ...
Sophie Weigle's user avatar
1 vote
0 answers
37 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
123 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
105 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
251 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
65 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
993 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
148 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 ....
Jiang Yuanhao's user avatar
1 vote
1 answer
41 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
195 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
828 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
  • 121
1 vote
1 answer
80 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
49 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
99 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
108 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
318 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
121 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
88 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
84 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
195 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
166 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
614 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
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 ...
Sage Stark's user avatar
4 votes
1 answer
211 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
956 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
  • 481
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
50 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
160 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
530 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
2 votes
0 answers
119 views

Can Ultisnips regular expression match forward?

The question may be also phrased as, can Ultisnips regular expression match after the current cursor? My goal is to have a postfix of curly bracket for LaTeX subscripts. Say I want to type a_{bcd}, ...
Frid Fu's user avatar
  • 21
0 votes
1 answer
57 views

Plain Text for LaTeX, No Rich Text Features [duplicate]

Look at Line 37 and Line 45, Line 45 has been folded so that $...$ does not show. But I do not want this feature. Is there any way to stop it? (I have not installed vimtex) Also I do not want the rich ...
Firestar-Reimu's user avatar
1 vote
1 answer
85 views

Enhance Latex Syntax without Rewriting everything

I want to extend the latex syntax for the given file: \documentclass[a4paper,11pt]{book} \begin{document} \begin{figure}[t] \begin{tikzpicture} \node[alter] at (0,0) (v1) {typ0}; ...
Uwe Müller's user avatar

1
2 3 4 5