# curly brackets issue (latex)

Bug #1252188 reported by Maxim Gonchar on 2013-11-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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 on 2013-11-18: #1

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 on 2013-11-18: #2

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 on 2013-11-19: #3

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 on 2013-11-19: #4

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