# Tag Info

10

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 likely contains several examples already. If you type :tabe $VIMRUNTIME/syntax/tex.vim you should get the tex syntax file in a new tab. If you then search /\c@... 6 You are looking for set iskeyword-=: That is, making : explicitly not a keyword character. If : is in iskeyword it will be included in ciw. 6 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:tex_conceal. For direct control of the conceal feature itself, see :help conceallevel, :help concealcursor and :help syn-conceal. Short answer, you can put the ... 6 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:vimtex_fold_manual which if enabled (set to nonzero value) will set foldmethod=manual, and instead will remap zx and zX to recalculate the folds when necessary (... 5 :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 mapping you must use a recursive mapping. :inoremap is a non-recursive mapping, :imap is a recursive mapping. Second, since <Plug>vimtex#delim#close() is ... 5 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 rule for tex command arguments allows spell checking. Some commands, e.g. \include{...}, are not spell checked. This is controlled by the @Spell and @NoSpell ... 5 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 '\\command' nextgroup=texMyCommand syntax region texMyCommand matchgroup=Delimiter start='{' end='}' contained contains=@NoSpell Here texStatement and Delimiter ... 5 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 under ~/.vim/bundle, and they will be added to the 'runtimepath'. Observe: cd ~/.vim/bundle git clone https://github.com/lervag/vimtex.git Now vimtex is ... 5 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 any tex environment like equation, itemize, .... For example, if you cursor is somewhere inside $$Ax = b$$ the command die will ... 4 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 can also create an operator-pending mode mapping for im, in which case that would work with other operations such as dim or yim and other built-in or custom ...

3

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 let mapleader = ';' at the start of your _vimrc. If that's the case, the problem you're having is that vimtex actually uses the <localleader> (not <...

3

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 know more, http://vimdoc.sourceforge.net/htmldoc/intro.html Vim knows to distinguish key mappings and predefined commands. For example, if you have a mapping like ...

3

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 say, you must identify periods and punctuations, but you should also parse many macros, such as \emph{...}, and you should parse stuff like some text {\macro ...

3

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 mode and in normal mode. In insert mode, you can use it to make the word in front of the cursor into a command, i.e. test<f7> => \test{ FYI: If you ...

3

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 "diff"-ability. Long lines are easily readable in Vim with the following set: :set wrap :set linebreak And changes towards the end of a line are also perfectly ...

3

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 option was just ignored. The solution for me was setting DISPLAY: export DISPLAY=:0.0 After that everything worked exactly as it should. Edit: help x11-...

2

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 and syntax, and this particular problem is with how the internal tex plugin recognizes the filetype. To be more specific, the internal tex plugin differs ...

2

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, so that the snippet becomes: snippet 'math(.*)math' "math" wr `!p import subprocess code = match.group(1) code = 'ToString[' + code + ',TeXForm]' res = ...

2

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 compl-current you'll find: If there is a keyword in front of the cursor (a name made out of alphabetic characters and characters in 'iskeyword'), it is used as ...

2

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 corresponding to \. In this case, we would find it with :echo char2nr("\\"), which gives 92. Then, declare the variable corresponding to this number. In this case, ...

2

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 <CR>

1

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({ \ '$':{'quote': [{'d': '\$'}]}, \ }) augroup END I do not know how to make this change filetype-specific. If someone knows this, feel free to adjust ... 1 You can use a match for a \$, using a look-behind to match other equations enclosed in pairs of $s. That way you'll know you're always matching the first$ of each equation. This search will work: /$$^\([^]\|\[^]\+\$$\+\)\@<=\\$ See :help /\@<= for the look-behind operator. The rest of the regex should be (relatively) straightforward, the look-...

1

The problem you are describing seems to be clearly concerning the vimtex plugin. The proper solution is therefore to raise this issue where it should be raised, i.e. at vimtex's issue tracker. However, no need, I just fixed the issue, so if you update your plugins, then this indentation issue should be resolved. Please open an issue at the issue tracker if ...

1

I would install a personal syntax file, e.g. in .vim/syntax/tex.vim, to override the default with the content: let b:current_syntax = 'tex' In addition, you should add let g:vimtex_syntax_enabled = 0 to prevent vimtex from patching the syntax script.

1

A workaround might be to use the \DeclarePairedDelimiter command from the mathtools package to then just write like \leftopenint{a, b}. See the accepted answer to this question. \documentclass{minimal} \usepackage{mathtools} \DeclarePairedDelimiter\leftopenint{(}{]} \DeclarePairedDelimiter\rghtopenint{[}{)} \begin{document} \begin{equation*} \...

1

Run :Helptags after installing a new package. Then :help vimtex works.

1

clientserver needs X11 for working. So on OSX, you have to run XQuartz. Also, be sure that your vim is not a symlink to mvim with the -v option (mvim -v would run vim in terminal mode without X11 features, from my understanding).

1

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 your own as statox stated.

1

I don't really know a good solution that does things the way you want it to work. As far as I know, Vim is not really designed for this scenario, and as such, I would expect any solution to be rather hackish. However, I will dare to suggest that "you are doing it wrong". That is, if you are collaborating with a LaTeX document, then you really should be ...

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