Skip to main content
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:...
Karl Yngve Lervåg's user avatar
8 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.
Mass's user avatar
  • 14.2k
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 '\\...
Karl Yngve Lervåg's user avatar
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 ...
romainl's user avatar
  • 41.2k
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 ...
Jan's user avatar
  • 212
5 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 ...
Karl Yngve Lervåg's user avatar
4 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 ...
SibiCoder's user avatar
  • 3,432
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 ...
lemonad's user avatar
  • 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 ...
filbranden's user avatar
  • 29k
4 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 ...
D. Ben Knoble's user avatar
  • 26.6k
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 &...
D. Ben Knoble's user avatar
  • 26.6k
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 ...
Karl Yngve Lervåg's user avatar
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 ...
statox's user avatar
  • 50.1k
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 ...
filbranden's user avatar
  • 29k
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 ...
filbranden's user avatar
  • 29k
3 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 ...
Karl Yngve Lervåg's user avatar
3 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 ...
LEI's user avatar
  • 1,636
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 ...
Karl Yngve Lervåg's user avatar
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 ...
Karl Yngve Lervåg's user avatar
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= ...
Karl Yngve Lervåg's user avatar
3 votes

Conceal comments in Vim/Neovim

Enable folding of comments with the option g:vimtex_fold_types Since you are already using VimTeX, have you tried to set " .vimrc let g:vimtex_fold_enabled = 1 let g:vimtex_fold_types = { \ '...
Hotschke's user avatar
  • 4,790
3 votes
Accepted

Migrating from Latex-Suite to vimtex

I was wondering if anyone has already converted the latex-suite mappings into a snippets library? I don't know. While toying with migration, I discovered that the way snippets and latex-suite's IMAP(...
Karl Yngve Lervåg's user avatar
2 votes

LaTeX: Ultisnips

Like statox said, you should really write you own snippets. But I understand it is nice to have a set to look at, see what others are doing. One post I thought was really helpful was "How I'm ...
Ricardo Kullock's user avatar
2 votes

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

I think would be useful a "Toggle" mapping that allows us to swich concealling level: nnoremap <Leader>c :let &cole=(&cole == 2) ? 0 : 2 <bar> echo 'conceallevel ' . &cole <...
SergioAraujo's user avatar
  • 1,185
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, ...
Cristiano De Michele's user avatar
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 ...
filbranden's user avatar
  • 29k
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 ...
husB's user avatar
  • 2,133
2 votes

How to remap ci$

You can also put the following in your .vimrc: xmap dsm <plug>(vimtex-env-delete-math) xmap csm <plug>(vimtex-env-change-math) xmap am <plug>(vimtex-a$) xmap im &...
mahbubweb's user avatar
  • 602
2 votes

How to quickly jump between inline equations in vimtex?

Combine vim-ninja-feet and targets.vim Preliminary steps Change $ from separator to quote augroup mytargets autocmd! autocmd User targets#mappings#user call targets#mappings#extend({ ...
Hotschke's user avatar
  • 4,790
2 votes

vimtex conceal options and character substitution not working on Windows

I wanted to write and edit a .tex document as fast as possible, so I followed this guide, but I can't get vimtex to work properly. If you just want to edit a .tex document and not want to spend time ...
Karl Yngve Lervåg's user avatar

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