Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using snipmate plugin in vim, and started creating some snippets to use in Zope.

Unfortunately, the snippets I'm creating are some html attributes, and everytime I call the snippet, it works as expected but it inserts a carriage return after the snippet, and I have to return the end tag > to it's place everytime I run a snippet, thus losing productivity advantage in using snipmate.

How do I create a snippet that doesn't insert a carriage return after the snippet?

share|improve this question
can't answer to your question, but i changed the template-system over to xtp-template ( – akira Jun 29 '10 at 14:28
up vote 1 down vote accepted

My bad. When you create your own snippets in your file:

snippet snippet1

snippet snippet2

This "space" between snippets is reponsible for the extra carriage return. If I maintain my snippets file like this:

snippet snippet1
snippet snippet2

It works as expected. The carriage return was being used as a snippet as well.

share|improve this answer
I swear I can't see the difference between the two. – Rook Jun 29 '10 at 18:30
There's a carriage return between the two snippets in the first example, the second there isn't. Snipmate thinks the carriage return between two snippets definitions is from the first snippet and call it when you execute the snippet in vim. If you don't want a carriage return after your snippet, you shouldn't separate snippet definitions with carriage returns. – Somebody still uses you MS-DOS Jun 29 '10 at 19:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .