You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
snippet mm "Inline Math" wA
\\( $1 \\) $0
endsnippet
which inserts inline math mode in LaTeX: \( | \) where cursor position is |
and following .vimrc:
"-------------Load Plugins------------------
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRCendifcall plug#begin('~/.vim/plugged')Plug 'lifepillar/vim-mucomplete'Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'Plug 'lervag/vimtex'call plug#end()"---------------End Plugins added-----------------------"----------- UltiSnips triggering-------------let g:UltiSnipsExpandTrigger = '<C-a>'let g:UltiSnipsJumpForwardTrigger = '<C-a>'let g:UltiSnipsJumpBackwardTrigger = '<C-d>'let g:UltiSnipsEditSplit="vertical"let g:UltiSnipsSnippetDirectories=[$HOME.'/.vim/UltiSnips']
"-----------End ultisnips--------------------
"---------Begin MuComplete Setup-----------
set completeopt+=menuone
set completeopt+=noselect
set belloff+=ctrlg
let g:mucomplete#enable_auto_at_startup = 1
"---------End MuComplete Setup-------------
set textwidth=79
set colorcolumn=79
type mm close to column number 79/78 so that the snippet expansion breaks across two lines.
Expected behavior:
If broken into two lines, the snippet should expand like so:
\(<col 79>
|\)
Actual behavior:
instead it expands like so
\(<col 79>
\|)
where the cursor position after snippet expansion is between the closing \ and )
I checked with the VimTeX repo and it seems to not be an issue with that plugin. The author/maintainer there indicates that it could possibly be an issue with UltiSnips. See here
Steps to reproduce
Please see above. An explanatory animated gif is below:
Operating System: Windows 10, WSL
Vim Version: VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31)
Included patches: 1-2269
Given snippet:
which inserts inline math mode in LaTeX:
\( | \)
where cursor position is|
and following .vimrc:
type
mm
close to column number 79/78 so that the snippet expansion breaks across two lines.Expected behavior:
If broken into two lines, the snippet should expand like so:
Actual behavior:
instead it expands like so
where the cursor position after snippet expansion is between the closing
\
and)
I checked with the VimTeX repo and it seems to not be an issue with that plugin. The author/maintainer there indicates that it could possibly be an issue with UltiSnips. See here
Steps to reproduce
Included patches: 1-2269
[GCC 9.4.0]
The text was updated successfully, but these errors were encountered: