curly brackets issue (latex)

Bug #1252188 reported by Maxim Gonchar on 2013-11-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UltiSnips
Won't Fix
Undecided
Unassigned

Bug Description

Something wrong happens when I extend the default snippet for begin/end expansion:

snippet "b(egin)?" "begin{} / end{}" !br
\begin{${1:something}}$2
 ${0:${VISUAL}}
\end{$1}
endsnippet

Then I type:
begin<tab>test<C-j>{option}

and the output I get is the following:
\begin{test}{option}

\end{test}{option}

It's clear that the string '{option}' is not supposed to be at the end.

Py version:
2.7.5 (default, May 12 2013, 12:00:47)
[GCC 4.8.0 20130502 (prerelease)]

Maxim Gonchar (gmaxfl) on 2013-11-18
description: updated
SirVer (sirver) wrote :

works for me with the keys you type.

\begin{test}{option}

\end{test}

I am using the latest version from github/SirVer (which is the only one supported) on Mac OS using mvim 7.4. What is your setup?

Maxim Gonchar (gmaxfl) wrote :

It seems that the issue is caused by auto-pairs plugin. It happens when it inserts closing '}'. If it's disabled, no ultisnips problems.

SirVer (sirver) wrote :

Mmh, sorry about this. But there is not much more that can be done. Vim is not really designed for plugins and does not give any guarantees or invariants for their execution, so having two pluggins interfering is a common thing.

Ultisnips gets confused whenever one plugin moves the cursor, so this is likely it. Patches are welcome, but I do not think that there is an easy fix to this.

Changed in ultisnips:
status: New → Won't Fix
Maxim Gonchar (gmaxfl) wrote :

SirVer, yes, I understand this.
Thank you for the explanation.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers