Skip to main content

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
90 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 ...
0 votes
0 answers
1k views

Open pdf command in Nvim

I use Nvim to write my LaTeX documents. In my init.vim file I have defined a command to compile my .tex file like this: command CompileXelatex !xelatex -halt-on-error % I tried to do the same to view ...
2 votes
1 answer
32 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"...
2 votes
3 answers
75 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
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 ...
4 votes
2 answers
2k views

LaTeX: Ultisnips

I'm new to Vim and setting up LaTeX with vimtex. Now, I am looking for a Snippet-Manager and decided to give UltiSnips a try. It seems to be very handy. But it doesn't come with a lot snippets (honza/...
0 votes
1 answer
81 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 ...
3 votes
0 answers
690 views

in-line math equation rendering/preview for macvim/vim for filetypes other than RMarkdown

I recently installed vim-rmarkdown package, and found that the package allows me to see the rendered math equation in macvim, and when move cursor over, the line will render back to latex equation ...
4 votes
2 answers
210 views

Apply formating with a script, or have ftplugin format particular text based on syntax

When I am writting a Latex document I generally like to keep an 80 column line width to keep things easy to read. However I don't like to use text wrapping because it can get in the way of typing ...
2 votes
2 answers
55 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 {},...
1 vote
2 answers
700 views

How to use TexMathZones in Markdown Syntax, for Snippets?

I am a recent and very happy Vim User. I write Mathematics and Computer Science Lecture Notes in Markdown Files, organized in a Vimwiki. I use the UltiSnips Snippet Plugin. This plugin provides me ...
7 votes
3 answers
748 views

Make % jump between identical delimiters

I use Vim to edit LaTeX files frequently. I want to use % to jump between matching $ which can be used to delimit where mathematical expressions are written. I have tried using matchit and, ...
1 vote
2 answers
155 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 ...
1 vote
2 answers
71 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 ...
1 vote
1 answer
570 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" ...
4 votes
1 answer
224 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 ...
1 vote
0 answers
171 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 ...
1 vote
1 answer
75 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
2 answers
458 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 ...
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\+...
2 votes
2 answers
825 views

Vim-latex not starting automatically for .tex files

I have Vim on Ubuntu 18.04 and I am trying to use the vim-latex package. By typing :set rtp? on Vim I get the following output: runtimepath=~/.vim,~/.vim/pack/bundle/start/vim-latex-1.10.0,/var/lib/...
0 votes
0 answers
218 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 ...
-1 votes
1 answer
388 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. ...
4 votes
1 answer
290 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 ...
3 votes
1 answer
2k views

How to show all LaTeX code but still have set conceallevel=3 for vim-devicons and NERDTree?

How can I adjust my .vimrc so that set conceallevel=0 is specific to just LaTeX documents? The plugin vim-devicons requires the following conceal level with NERDTree: set conceallevel=3 However, ...
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'...
0 votes
0 answers
65 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 ...
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 : ...
1 vote
1 answer
114 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 ...
-2 votes
1 answer
38 views

What is `<++>`?

In the example in this question, and in the latex-suite documentation, what is <++>?
1 vote
0 answers
24 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 ...
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 ...
4 votes
2 answers
2k views

UltiSnips, Context and Tex

For best experience, I want to enable some snippets to be expanded only in Tex Math environments. A wonderful person, lacygoill helped me on GitHub to achieve just this with the following setup: Let ...
0 votes
0 answers
135 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[...
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 ....
1 vote
1 answer
72 views

Concealing ~ in texvim + conceal

I tried syn match texStatement '\\\[' contained conceal cchar=⟦ syn match texStatement '\\\]' contained conceal cchar=⟧ syn match texStatement '\\~' ...
2 votes
0 answers
297 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 ...
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 ...
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 ...
1 vote
1 answer
43 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 ...
2 votes
1 answer
234 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
84 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 ...
16 votes
6 answers
24k views

How do I get Vim to compile my .tex file when executing :w?

My writing routine is like this: I edit a .tex file using vim I go to the command line and I compile it using pdflatex. I find myself always saving the file with :w and immediately having to switch ...
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 ...
1 vote
2 answers
106 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 ...
2 votes
1 answer
118 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 ...
33 votes
5 answers
647 views

How can I treat LaTeX quotes as a text object?

Quotation marks in LaTeX are different than in normal text, in that they're formatted ``like this'' (or `like this' for single quotes). This makes it difficult to navigate through them in Vim. I ...
0 votes
1 answer
355 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 ...
1 vote
1 answer
123 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, ...
16 votes
2 answers
1k views

Inline English grammar checker for vim-latex?

I am looking for English grammar checker for vim-latex suite that checks the grammar as I type but does not highlight what's inside $$ or \begin{equation} & \end{equation} commands. Is there any ...

1
2 3 4 5