xiaohanyu / oh-my-emacs

[Stopped] Provide an awesome, out-of-box, literate dotemacs for both newbies and nerds.
BSD 3-Clause "New" or "Revised" License
705 stars 141 forks source link

Redundant closing braces after expansion of a snippet #129

Closed Plypy closed 9 years ago

Plypy commented 9 years ago

When I was trying to use the snippets in CPP, it will insert redundant closing braces for some snippets. Like main fori, after the expansion, the result will go like below

int main(#cursor#)int argc, char *argv[])
{

    return 0;
}

Thouth it works fine for for.

Plypy commented 9 years ago

This seems to be a very basic function, shouldn' there be anyone else who has noticed that as well, or just me???

xiaohanyu commented 9 years ago

What you mean redundant? Seems this is a problem of yasnippet, not oh-my-emacs

Plypy commented 9 years ago

You see there is one extra closing bracket inputted after the cursor, and lead to [yas] Snippet 1 exited..

I think that the closing bracket is generated by some others. But being a new Emacs user, I'm not sure.

xiaohanyu commented 9 years ago

I tried but this bug didn't reproduced on my ome, maybe you can turn off smartparens-mode and try again.

Plypy commented 9 years ago

It worked, thanks!

Also, I've searched the Smartparens repo, there are few same issues. So it is Smartparens to blame.

xuchunyang commented 9 years ago

@Plypy consider closing this issue?