PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

YASnippet

YASnippet

YASnippet is a text markup created in 2008 by Zhang Chiyuan.

#353on PLDB 14Years Old 3.6kUsers
0Books 0Papers 403Repos

A template system for Emacs


Example from the web:
# -*- mode: snippet -*- # name: fun # key: fun # expand-env: ((yas-indent-line 'fixed)) # -- ${1:function-name} :: ${2:type} $1 ${3:arguments} $0
Example from Linguist:
# name: Read stdin # key: stdin # group: es6 # -- new Promise(resolve => { let input = ""; process.stdin.setEncoding("UTF8"); process.stdin.on("readable", () => { const chunk = process.stdin.read(); null !== chunk ? input += chunk : resolve(input); }) }).then(data => { $1 });

Language features

Feature Supported Example Token
Comments
# A comment
Line Comments
# A comment
#
Semantic Indentation ϴ
powerbuilder.html · yasnippet.html · free-pascal.html

View source

PLDB - Build the next great programming language · v2022 · Day 32 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com