Skip to content

Instantly share code, notes, and snippets.

@command-tab
command-tab / textmate 2 pug html embed.txt
Created October 23, 2020 23:14
Install the pug tmbundle, then edit the built-in HTML bundle to append this above the style pattern
{ begin = '(^[ \t]+)?(?=<(?i:template lang="pug")(?!-))';
end = '(?!\G)([ \t]*$\n?)?';
beginCaptures = { 1 = { name = 'punctuation.whitespace.embedded.leading.html'; }; };
endCaptures = { 1 = { name = 'punctuation.whitespace.embedded.trailing.html'; }; };
patterns = (
{ name = 'meta.embedded.block.html';
begin = '(?i)(<)(template)(?=\s|/?>)';
end = '(?i)((<)/)(template)\s*(>)';
beginCaptures = {
0 = { name = 'meta.tag.metadata.pug.start.html'; };
@command-tab
command-tab / OvenPlayer.vue
Created January 8, 2022 04:58
An example Vue component that wraps OvenPlayer 0.10.15
<template>
<div class="ovenplayer">
<div ref="player" />
</div>
</template>
<script>
import OvenPlayer from 'ovenplayer'
export default {