Skip to content

Instantly share code, notes, and snippets.

@akella
Last active November 29, 2023 13:57
Show Gist options
  • Save akella/9757676 to your computer and use it in GitHub Desktop.
Save akella/9757676 to your computer and use it in GitHub Desktop.
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
</snippet>
@siberianbear
Copy link

Simple & nice! Thanks 😃

@Orlangyr
Copy link

Hello, can you help me please to install this snippet?

@vadmurzakov
Copy link

мастхэв, спасибо

@romanklsnk
Copy link

благодарочка

@golenishchev
Copy link

Is there any reasons to have two spaces in "" before "-->"?

@GeezGeez
Copy link

Спасибо

@akella
Copy link
Author

akella commented Oct 18, 2015

@golenishchev none that i know of, just the way i do it
PS: fixed that

@slaffko1
Copy link

Я недавно открыл для себя jade, и необходимость в таких снипетах отпала

@vshap
Copy link

vshap commented Nov 8, 2015

Great thnx. Rewrite it 4 Atom.

@TIIGRUS
Copy link

TIIGRUS commented Nov 22, 2015

Спасибо за снипет, очень своевременная вещь! Помогает и упрощает работу. Логистика будет!)) Разрабы будут рады!)
Установка: TOOLS > NEW SNIPPET > УБИРАЕМ ВСЕ И ВСТАВЛЯЕМ КОД НАШЕГО СНИПЕТТА. > СОХРАНЯЕМ КАК "ALL FILES" В ДИРЕКТОРИЮ КОТОРАЯ БУДЕТ ПО УМОЛЧАНИЮ. Вот и все.
После можно перезагрузиться.)

@alekseyfilippov
Copy link

Юра, вопрос: а можно его как-нибудь в конструкции Emmet встроить? В какую сторону смотреть?

@badblockk
Copy link

А в Atom можно внедрить этот сниппет?

@bodyazinchenko
Copy link

Спасибо! Очень удобная штука (:

@alexandershustik
Copy link

alexandershustik commented May 11, 2016

ALERT save to filename " html-dicomment.sublime-snippet " necessarily

I'm rewrite this snipet for [section]

https://gist.github.com/alexandershustik/b83557c27772c7348228ac0b5da00fd2

@greyxp
Copy link

greyxp commented May 28, 2016

@fychmen
Copy link

fychmen commented Jul 23, 2016

Спасибо!

@dimakrsna
Copy link

Спасибо!

@Kamposter
Copy link

Kamposter commented Oct 11, 2016

Столкнулся с такой проблемой, что сейчас, при создании обычного класса, Эммет не раскрывает див полностью с табуляцией.
При .class + TAB:

<div class="class">|<!-- Тут курсор  --></div>

Вместо:

<div class="class">
        |<!-- Тут курсор  -->
</div>

Может вопрос смешной, но инфы нигде не нашел( В чем может быть проблема?

@manishram
Copy link

hey guys how can i extract phone number using php..?

@kozakevych
Copy link

Дякую!)

@HASKADOG
Copy link

Спасибо)

@galcev
Copy link

galcev commented Jun 28, 2017

Thank you!

@CssHead
Copy link

CssHead commented Sep 29, 2017

Всем хай, подскажите как сие чудо добавить в Sublime 3? Emmet блочит стандартные сниппеты, как его адптировать под emmet? Только начал с ними разбираться, пока что мозга не хватает ))))))

@skifgold
Copy link

skifgold commented Nov 7, 2017

For atom
Atom->Snippets...

It will open snippets.cson

for .html:

 '.text.html.basic':
  'semantic div':
    'prefix': 'di'
    'body': '.<!-- begin $1 -->\n
            <div class="$1">\n
            	$2\n
            </div>\n
            <!-- end $1 -->'

for .php:

 '.text.html.php':
  'semantic div':
    'prefix': 'di'
    'body': '<!-- begin $1 -->\n
            <div class="$1">\n
            	$2\n
            </div>\n
            <!-- end $1 -->'

Just copy/paste into the snippets.cson and save file

@abztrakte
Copy link

Спасибо!

@devxom
Copy link

devxom commented Nov 26, 2017

Спасибо.
Адаптировал под vscode https://gist.github.com/devxom/edc3c76235fc050a5ba594f372ca5740

@Nikolasgrizli
Copy link

Спасибо огромное, адаптировал под vs code HAML https://gist.github.com/Nikolasgrizli/13816855947c0ba5124432ae29e91c0b

@AndreyK80
Copy link

thank

@Waidoss
Copy link

Waidoss commented Jan 28, 2019

спасибо!!

@Yakymets049
Copy link

крутая штука :) спасибо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment