Giter VIP home page Giter VIP logo

Comments (14)

SirVer avatar SirVer commented on May 22, 2024

I cannot reproduce this. I cloned this repository as Latex Suite:

git clone https://github.com/vim-scripts/LaTeX-Suite-aka-Vim-LaTeX.git

but all mappings work fine for me. You can also remap your snippet keys
(see UltiSnips documentation). Note that Latexsuite also adds very cheap
snippets, so there is some functional overlap in the plugins. This
guarantees trouble.

status incomplete
importance low

Launchpad Details: #LPC SirVer - 2012-03-03 23:27:57 +0100

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

I can reproduce this issue.
One way of fixing this is by adding the following to your .vimrc:

"with the following c-j is not mapped to the default keys
if &filetype != 'tex'
"imap IMAP_JumpForward
"nmap IMAP_JumpForward
"vmap IMAP_JumpForward
"vmap IMAP_DeleteAndJumpForward
imap #$ IMAP_JumpForward
nmap #$ IMAP_JumpForward
vmap #$ IMAP_JumpForward
vmap #$ IMAP_DeleteAndJumpForward
endif

this just means that for any file other than latex the should work fine with ultisnips.
In latex I actually use the default mapping defined in the vim-latex plugin. If you also want to use the ultisnips mapping in latex remove the if statement.

The prefered mappings would be the ones that are commented out, but if I use those then I get an error in ultisnips, described in
https://bugs.launchpad.net/ultisnips/+bug/937605, so I just use some weird sequence for the mappings that I would not use otherwise.

Launchpad Details: #LPC Jorge - 2012-03-14 06:16:22 +0100

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

Are you all using the latest trunk? Are you sure about this? Because I cannot reproduce This or the bug 937605 with the latest trunk version of UltiSnips on Windows OR on Mac OS.

Launchpad Details: #LPC SirVer - 2012-03-14 09:28:48 +0100

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

[Expired for UltiSnips because there has been no activity for 60 days.]

Launchpad Details: #LPC Launchpad Janitor - 2012-05-14 06:17:15 +0200

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

No answer, no fix. Speak up if you still care.

Launchpad Details: #LPC SirVer - 2012-05-14 09:34:07 +0200

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

I can reproduce this error with latest version of ultisnips and vim-latex, and the conflict happen in INSERT mode, is it possible to fix it?

Launchpad Details: #LPC Xiang Gao - 2012-08-27 23:35:19 +0200

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

Just find out my conflict only happens in tex file and now I map it to ;j

Launchpad Details: #LPC Xiang Gao - 2012-08-28 00:54:51 +0200

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

I still can reproduce this error with the latest version of both packages in tex files.

Launchpad Details: #LPC Matteo - 2013-07-23 11:05:17 +0200

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

Fixes welcome. Likely a clash of mappings in the plugins.

Launchpad Details: #LPC SirVer - 2013-07-23 13:15:43 +0200

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

Apparently just adding

imap IMAP_JumpForward

to my .vimrc fixed the problem. That looks quite strange, can somebody else check?

Launchpad Details: #LPC Matteo - 2013-09-16 16:16:22 +0200

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

It appears to be a collision, not a bug. vim latex-suite uses C-j extensively to jump outside of delimiters after expansion. UltiSnips also maps this sequence to jump to the next marker. Unfortunately I use UltiSnips extensively to expedite my LaTeX editing but I also don't think I'd be able to live without vim latex-suite. My sub-optimal solution has been to place

imap IMAP_JumpForward

in my .vimrc file and live without C-j functionality in UltiSnips by creating LaTeX-compatible snippets like this:

snippet exb "Beamer Example Block" b
\begin{exampleblock}{${1:Block Title}}
${2:<++>}
\end{exampleblock}
endsnippet

It's inelegant and I wish there were a better solution.

Launchpad Details: #LPC Steve Mazza - 2014-02-05 15:22:37 +0100

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

Not sure what you want to say Steve, of course it is a collision :). is a very logical mapping for a snippet jump forward trigger, so it is no wonder that latexsuite is also using it for their pseudo snippets. You folks have a bunch of choices:

  • Use another trigger for jumping forward in UltiSnips (see help, here: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt#L240)
  • Use another trigger in LatexSuite (consult their help).
  • Rely on a brand new feature in ultisnips that will only map jump forward and jump backwards while actually being inside a snippet. Of course you still have the conflicts, but only while you have expanded a UltiSnips snippet. Do not know if this will help anybody. For reference, the commit that implements this is here: 16c4661

Launchpad Details: #LPC SirVer - 2014-02-05 19:30:50 +0100

from ultisnips.

SirVer avatar SirVer commented on May 22, 2024

Boldly setting to fix committed because I think the new default should deal with most awkward situations.

Launchpad Details: #LPC SirVer - 2014-02-05 19:31:55 +0100

from ultisnips.

bongbang avatar bongbang commented on May 22, 2024

I'm having the same problem (in .tex files only) but I don't understand your last proposed solution ("brand new feature"). The new default you mentioned apparently didn't quite do it because the problem persists despite the latest version of UltiSnip I installed.

from ultisnips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.