-
-
Notifications
You must be signed in to change notification settings - Fork 682
Open
Description
Given snippet:
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 $MYVIMRC
endif
call 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=79type 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 - UltiSnips Version: 53e1921
- Python inside Vim: 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] - Docker repo/vimrc: minimal .vimrc pasted inline above
Metadata
Metadata
Assignees
Labels
No labels
