Questions tagged [filetype-tex]

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

Filter by
Sorted by
Tagged with
42
votes
2answers
12k views

What are the differences between LaTeX plugins?

There are a number of Tex plugins for vim (vim-latex, AutomaticLatexPlugin to say a couple). What are the differences in the provided functionalities between these (the ones I named and possibly ...
1
vote
1answer
100 views

formatoptions for hybrid (short markup + long paragraphs) content

I am trying to write my PhD thesis in vim using LaTeX So the documents will have two distinct types of content - markups that are relatively short, and paragraph text that is rather long. \begin{...
3
votes
2answers
144 views

Replace text and move cursor to end of replacement in insert mode

How can I perform a search-and-replace and leave the cursor at the end of the replacement? I want to replace $...$ with \(...\) as I type in insert mode. Notice that I can't use an abbreviation, ...
29
votes
4answers
394 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 ...
12
votes
2answers
2k views

How can I lookup LaTeX symbols in Vim?

Can I integrate some form of symbol completion to Vim? Dedicated TeX editors like TeXMaker provide a list of symbols for completion (for example, \al shows a list with \alpha, \la shows \lambda and \...
5
votes
1answer
133 views

Text formatting CVS-friendly

I have seen this very interesting article: http://dustycloud.org/blog/vcs-friendly-patchable-document-line-wrapping/ --- basically it is a suggestion for hard-breaking lines of text (for example, in ...
2
votes
1answer
414 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 ...
10
votes
2answers
219 views

Context sensitive insert mode mapping or abbreviation

I'm planning to implement some utility mappings for my LaTeX plugin to simplify typing of mathematics. For instance, I want to create abbreviations similar to `a : \alpha `b : \beta -> : \to => ...
6
votes
1answer
85 views

Autoformatting LaTeX: how to add characters in front of a wrapped line

When writing LaTeX, I like a newline between every sentence as it helps me jump around more easily. Additionally, I put two spaces at the start of lines where sentences don't start. For example: This ...
5
votes
1answer
192 views

Turn off Vim spellcheck in custom region

I have the following definitions in a .tex file preamble: \newcommand{\beq}{\begin{eqnarray}} \newcommand{\eeq}{\end{eqnarray}} If I then use \beq and \eeq to define an equation array region, spell ...
5
votes
1answer
313 views

Insert a newline after punctuations

I'm writing a report in LaTeX that I keep in a Git repository. In order to make the most out of Git, I would like to keep each sentence on its own line. I.e. for each dot, exclamation mark and ...
5
votes
2answers
284 views

iskeyword for latex

Context Currently, when I set ft=tex, my set isk? reads iskeyword=@,48-57,_,192-255 that is, the default for vim. My "issue" Currently, in a LaTeX string such as $\abcde_\fgh$ the w jump would ...
4
votes
2answers
142 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
1answer
59 views

Unable to set iskeyword for colon ( : ) character

I am using vim to edit LaTeX files. Throughout the text, there are labels to equations, tables etc. for which an accepted convention among TeX writers is the following \label{eq:massenergy} , \...
1
vote
2answers
660 views

Syntax highlighting of underscores in LaTeX, even though they only appear in filenames

I'm using nvim and LaTeX together, and for the most part it's been great. However, nvim appears to be incorrectly highlighting underscores that appear in filenames I include as part of the subfiles ...