UltiSnips Screencast - Ep 2 - Creating Basic Snippets

Holger Rapp · 69K views · 2012 · 9:32

Open on YouTube

Testing, debugging & developer toolsSoftware practice, open source & careerstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering or asking about UltiSnips snippet syntax and behaviour, citing specific moments such as the snippet-snippet demo and automatic reloading.

Recommended by 1 people across 1 different months, 2014 to 2018.

What it is

A short screencast by UltiSnips author Holger Rapp that walks through the basic features of the UltiSnips Vim snippet plugin, including writing a snippets file and defining simple snippets. It is the second episode in his UltiSnips screencast series, with a companion blog post of further examples.

What people said

Recommends DOOM · 2015-02 · Stack Overflow · on “vim ultisnip expanding after the line break”

What you are looking for is something already covered by the screencast for Ultisnips [this video] . All you need is regex adjustment to your snippet value $1 Program ${1:`!v expand('%:r')`} Implicit None ${2:<++Start Typing++>} End Program ${1/([^\n$]+).*/$1/} endsnippet ${1/([^\n$]+).*/$1/} | | | | | +--------Replace by first atom i.e. Matched by (..) | +--------Anything That follows. +----------- Match everything except a newline | EOL(endofline)

Cites pickle323 · 2014-11 · Stack Overflow · on “UltiSnips new snippet snippet”

I'm trying to create a new snippet snippet the way that the author of UltiSnips does at 1:28 in this instructional video that he made [this video] How do you put "endsnippets" inside of the snippet without it calling the end of the snippet? So far I've put the following in ~/.vim/UtliSnips/snippets.snippets snippet snip "The Snippet Snippet" snippet ${1:Trigger} "${2:Description}" ${3:Options} ${0} endsnippet endsnippet This is somewhat of a solution however it creates whitespace at the start of evey "endsnippet" line for every snippet I make. I want to get it right up to the left edge of the screen just like it is in the video. Any suggestions?

Cites A.Wan · 2018-06 · Stack Overflow · on “UltiSnips doesn't automatically reload changes to snippets file”

(Documenting this here because I couldn't find a good answer online.) When using UltiSnips, the documentation says ( 2:12 in this screencast [this video] ) that writing the .snippets file is enough to cause an automatic reload of the snippet. However, this doesn't work for me. What's happening?