11 votes

How to configure spell to ignore some environments in LaTeX

You can disable spell checking for syntax items by adding them to a cluster together with @NoSpell. You can read :help spell-syntax for some information and look at your tex syntax file which most ...
  • 3,219
9 votes
Accepted

Folding slow with vimtex

First: Did you bother to read the vimtex documentation, i.e. :h vimtex-folding? The docs clearly point out that the fold-expr method of folding is slow, and so therefore provides an option g:...
8 votes
Accepted

How to force vimtex to display \textbf and \textit in insert/normal mode?

This is not due to vimtex directly, but due to the conceal feature in Vim. vimtex only adds to the syntax plugin that ships with Vim/neovim, and it adhers to the relevant option, see :help g:...
7 votes
Accepted

Unable to set iskeyword for colon ( : ) character

You are looking for set iskeyword-=: That is, making : explicitly not a keyword character. If : is in iskeyword it will be included in ciw.
  • 12.9k
6 votes

How to configure spell to ignore some environments in LaTeX

You can add your own syntax rules to e.g. ~/.vim/after/syntax/tex.vim. In order to prevent spell checking inside a command such as \url, you can use the following code: syntax match texStatement '\\...
6 votes
Accepted

installing vimtex?

To install with vim-pathogen, this should work (taken directly from the readme, I just swapped vim-sensible with vimtex): Now any plugins you wish to install can be extracted to a subdirectory ...
5 votes
Accepted

How to enter commands starting with i

In vimtex, the mappings like ie are actually vim text objects (not sure about the right vim nomenclature though). They work together with vim operators like d (delete). In particular ie stands for ...
  • 202
5 votes

How to remap <Plug>vimtex#delim#close()<CR>?

:imap ) <Plug>vimtex#delim#close() You are supposed to deal with "Plug mappings" just like you would deal with any other mapping. First, since you want to reuse another mapping in your own ...
  • 33.4k
5 votes
Accepted

How do I spellcheck TeX files using vim-lexical, skipping some command arguments but not others?

First: This is not related to vim-lexical. Syntax rules define where spell checking should be done, and so the current behaviour is defined by the internal syntax plugin for LaTeX. The default syntax ...
4 votes

Vim not starting server

I had exactly the same problem when trying to get vimtex working with Skim. That is, I had vim 8 installed with --with-client-server (showing as +clientserver) and XQuartz running but --servername ...
  • 141
4 votes
Accepted

How to remap ci$

Since i$ is a mapping itself (defined by the vimtex plug-in), you need a recursive mapping to be able to use i$ as part of the expansion of your mapping. So this should work: nmap cim ci$ But you ...
  • 26.5k
4 votes
Accepted

vim command for jumping to <++>

Sure: nnoremap <C-j> /\V<++><CR>cgn " if you want insert-mode versions, too imap <C-j> <esc><C-j> Or, if you don't want to mess with search history, nnoremap &...
  • 21.9k
4 votes
Accepted

vimtex: Avoid aligning in align environment in the document

So I'm using vimtex, and it's great Glad you like it! :) but there is one thing that is so annoying ... What I want is the far superior This is clearly opinionated! If it was objectively "far ...
3 votes

How to fix Leader Key Beep in Vim?

If I understand your question correctly, you are trying to use the vimtex keybinding for the <plug>(vimtex-compile) command and you're expecting it should be available under ;ll, since you have ...
  • 26.5k
3 votes

How to enter commands starting with i

N represents Normal mode and O represents operational mode and X represents Ex mode. Mappings can be done in normal, ex (similar to command line), visual, insert and operational mode as well. To ...
  • 3,122
3 votes

Switching back and forth between two text layout conventions of input to LaTeX

This is a question that is difficult to write a very rigorous answer to. But I find it easy to state that the prospects are not quite good. At least not if you try to include the corner cases. As you ...
3 votes
Accepted

What's the purpose of F7 in vimtex? How is it used/

The <F7> key is enabled by default, unless you have other mappings either in your vimrc file or in another plugin that conflicts with the vimtex mapping. You can use the mapping in both insert ...
3 votes

Text formatting CVS-friendly

Rather than changing the way text is actually stored by writing a custom 'formatexpr', I'd be tempted to just to use Vim's existing features to solve the stated goals of easy readability and easy "...
  • 29.1k
3 votes
Accepted

Indentation is slow in vimtex

Well, they are two different implementations, so obviously they will use different amounts of time. vimtex indentation does more, which makes it slower. But I've worked hard on making it fast, and as ...
3 votes
Accepted

Disabling `kana/vim-textobj-entire` by filetype autocommand

UPDATE: Latest vimtex includes PR #1711 which allows you to configure vimtex to override existing mappings by setting this global variable from your vimrc: let g:vimtex_mappings_override_existing = 1 ...
  • 26.5k
3 votes
Accepted

How to set a command as a file type specific autocommand

First you need to create your command as local to a buffer, :h :command-buffer tells us that is what the argument -buffer is for. Then I think it's better to use ftplugins (:h ftplugin) to do this ...
  • 46.8k
3 votes
Accepted

Manually disable scripts(/plugins) during a session?

You have a few options, though some depend on plugin-authors to follow best-practices. vim --noplugin is kind of a nuclear option. You can combine with -Nu NONE or other -u options to get varying ...
  • 21.9k
3 votes
Accepted

Contextual Snippets in UltiSnips not working

The problem is that you have updated your plugins in the transition Linux to Mac. This also brings a major update of Vimtex, in which the syntax plugin has been included as part of Vimtex. Part of the ...
3 votes

(coc-)vimtex .bib completion strange suggstions

The problem here is that you are mixing two types of completion "backends": The built-in omni completion and the automatic completion by coc.nvim. VimTeX provides an omni-complete function ...
3 votes
Accepted

Concealing ~ in texvim + conceal

The last line does not work because you need to escape tilde. To use a space instead of X, you can simply write a space. So, this should work: syntax match texStatement '\\\~' contained conceal cchar= ...
2 votes
Accepted

LaTeX: Ultisnips

Neocomplete is an alternative that may have different snippets and is compatible with the UltiSnips repository. Other than that if you can't find what you are looking for, you might have to create ...
  • 1,536
2 votes
Accepted

Vimtex commands only working on main file

Short answer: add let g:tex_flavor = 'latex' to your vimrc file. So, more details. First: This problem is not related to vimtex. vimtex depends on the internal tex plugin, e.g. for filetype detection ...
2 votes

Using Mathematica in Vim produces errors when printing in TeXForm (double backslash, " b'-/n' ")

I do not know whether you have found a solution in the mean time, but according to this post https://stackoverflow.com/questions/606191/convert-bytes-to-a-string you have to decode the bytes object, ...
2 votes
Accepted

Recognizing the right expression to complete in insert mode

Most of auto-completion works with keywords, so the set of characters that make up possible completion prefixes and candidates is controlled by the 'iskeyword' setting. For instance, under :help ...
  • 26.5k
2 votes
Accepted

Surround on tex files

This behavior is from vim-surround. From its source code, pressing either l or \ will result in \begin. To change the default behavior, refer to :h surround-customizing. First, find the number ...
  • 1,558

Only top scored, non community-wiki answers of a minimum length are eligible