2022 Developer Survey is open! Take survey.

Questions tagged [filetype-tex]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Use inoremap in a more generalised way

I am creating shortcuts for editing LaTeX documents. I can add the following shortcut: inoremap ;b<Space> \begin{}<Enter><Enter>\end{}<Up> I would like a shortcut where I can ...
user avatar
1 vote
1 answer
32 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 ...
user avatar
1 vote
1 answer
42 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 ...
user avatar
  • 113
1 vote
2 answers
37 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 ...
user avatar
  • 121
2 votes
1 answer
30 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 ...
user avatar
  • 143
0 votes
1 answer
58 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 ...
user avatar
  • 3
0 votes
0 answers
19 views

How to override current command

I have Template command installed from sonicteomplate The problem with this plugin is, when I call a plugin, the cursor jumps to where {{_cursor_}} is, but it stays in normal mode, it doesn't go to ...
user avatar
  • 379
1 vote
1 answer
42 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, ...
user avatar
  • 379
0 votes
0 answers
14 views

Storing Latex Chunks in Registers

Previously I asked about how one could yank both sides of an equality into registers. My use case was writing latex and wanting to be able to take work that I previously just wrote and modify it ...
user avatar
0 votes
0 answers
30 views

Autocomplete strings with spaces

Am using conqueror of completion with latex autocomplete. Created a label with spaces. If i type \ref{, autocomplete will display that label as one of the options, however ctrl+n will only complete ...
user avatar
0 votes
0 answers
54 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 ...
user avatar
  • 101
0 votes
1 answer
39 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 ...
user avatar
3 votes
1 answer
83 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 ...
user avatar
  • 131
0 votes
1 answer
76 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, ...
user avatar
  • 1
1 vote
1 answer
101 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 ...
user avatar
  • 135
1 vote
0 answers
48 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 ...
user avatar
4 votes
1 answer
95 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}} %...
user avatar
1 vote
1 answer
307 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 ...
user avatar
0 votes
0 answers
27 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 ...
user avatar
  • 387
1 vote
1 answer
45 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} \...
user avatar
  • 11
0 votes
0 answers
35 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 ...
user avatar
  • 143
0 votes
0 answers
107 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 ...
user avatar
1 vote
1 answer
262 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 ...
user avatar
  • 245
2 votes
0 answers
79 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}, ...
user avatar
  • 21
0 votes
1 answer
37 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 ...
user avatar
1 vote
1 answer
49 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}; ...
user avatar
1 vote
1 answer
60 views

Syntax Highlight Problem for Latex/Tikz

I have a tikzpicture inside a latex file. My problem is that when I open the file and jump with GG to the end of the file, the math environment inside the tikz-nodes is not highlighted (e.g. $v_0^1$)....
user avatar
0 votes
0 answers
25 views

Automaticall close LaTeX begin environment with end [duplicate]

I want to automate some routine operations when working with LaTeX documents writing, e.g. I often write these lines: \begin{<environment-name>} some text and commands here \end{<environment-...
user avatar
  • 193
3 votes
0 answers
329 views

How to control and filter warnings in vim-latex?

While vim-latex is great, I've been having a bit of trouble using some of its features. Controlling the warning system (and hotfix window) has been particularly difficult for me. Today I'm trying to ...
user avatar
0 votes
1 answer
32 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 ...
user avatar
1 vote
1 answer
58 views

How to switch the order in which objects appear

I have a custom command in a TeX file which takes two inputs A and B, let's call it \operation{A}{B}. I want to find all of the instances of \operation where the first entry A starts with the string ...
user avatar
  • 187
0 votes
0 answers
475 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 ...
user avatar
1 vote
1 answer
429 views

UltiSnips regex macthing

I want the possibility of transforming an inline equation in latex to a display equation. So I want $something$ to become $$ something $$ My attempt was this: snippet "$(.+)$" "...
user avatar
0 votes
2 answers
70 views

conceal function not working in tmux

Version: vim 8.1 Problem: Latex objects like \int, ^, \alpha, \beta, etc, all get replaced by _ in tmux when using conceallevel=1,2. Expected: correct concealment, as it happens in normal terminal, ...
user avatar
1 vote
0 answers
40 views

Unwanted characters appear in an UltiSnips macro setup

I am new to vim and I am using a mac with vimtex, UltiSnips plugins. I am using the vim latex snippets found here (the tex.snippets file). Whenever I type "()", "{}", the text ...
user avatar
  • 111
1 vote
1 answer
113 views

Unable to select templates with vim-latex

I have Vim on Ubuntu 18.04 and I have sucessfully installed the vim-latex package. When I open a .tex file, vim regognizes it as latex and the plugin kicks in (I have already struggled with this a few ...
user avatar
2 votes
0 answers
129 views

Minimum window width will not change when using specific filetype

With most filetypes, I can resize font and my GVIM application window just fine. However, when I open a specific file type (.tex), the font is easily changed, but I am unable to shrink the application ...
user avatar
  • 187
2 votes
2 answers
126 views

Where do filetype-specific autocommands live?

I have a plugin for a specific filetype (*.tex), and I'm wondering where I can find all the commands which are executed when I type :e examplefile.tex? In general, is there a standardized practice for ...
user avatar
  • 187
3 votes
0 answers
47 views

More intelligent automatic formatting

I use vim to edit latex files and the automatic formatting option (formatoptions+=a) works very well, since you can enter text anywhere in the paragraph and vim will reformat the entire paragraph. The ...
user avatar
1 vote
1 answer
344 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/...
user avatar
3 votes
0 answers
71 views

How does expression folding actually work?

The following is a stripped down version of my folding function for LaTeX documents: setlocal foldmethod=expr setlocal foldexpr=LaTeXFoldsExpr(v:lnum) " Sections to be folded let g:...
user avatar
  • 139
1 vote
2 answers
281 views

Check if :make fails

I just setup this mapping for my latex development: nnoremap <buffer> <LocalLeader>o :make %:r.pdf <Bar> !open %:r.pdf<CR><CR><CR> But I wondered about checking if ...
user avatar
  • 20.6k
1 vote
0 answers
58 views

TeX syntax file not recognising bold-italic blocks

Basically title. Text inside \textit and \textbf is correctly formatted in italics and bold, but if I nest one inside the other, the text takes the formatting of the outer command, as shown here the ...
user avatar
  • 139
0 votes
1 answer
68 views

Toggle between displaymath and inline math modes in LaTeX

I'm trying to come up with a way of doing the following in vim. When editing LaTeX documents, I need on a fairly regular basis to toggle between display and inline math modes. Let me explain: suppose ...
user avatar
  • 101
1 vote
0 answers
20 views

Doxygen LaTeX syntax

I am using doxygen to document my code and I like to have additional markdown files which include formulas by using \f$ Formula \f$. I know markdown syntax provided by the vim-markdown plugin supports ...
user avatar
  • 121
3 votes
1 answer
619 views

TeX/LaTeX vim fold markers options

In complex files, especially when writing packages with basic TeX-LaTeX code, the standard definition of foldmarker, namely {{{,}}}, is unfortunate — in effect is quite common to have pieces of code ...
user avatar
  • 728
3 votes
1 answer
724 views

How to autocomplete citations in markdown files

I take notes in markdown files which I sometimes convert to other documents with pandoc. With the --bibliography=bibliography.bib argument, pandoc recognizes the @key citation format in markdown and ...
user avatar
0 votes
1 answer
600 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 ...
user avatar
1 vote
0 answers
116 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 ...
user avatar
  • 33
1 vote
1 answer
106 views

How to change make command

In my ~/.config/nvim/ftplugin/tex.vim I have the following: set makeprg=pdflatex\ -halt-on-error\ -file-line-error\ -synctex=1\ % set errorformat=%f:%l:\ %m however when I run make the command that ...
user avatar
  • 139