Тёмный

Customize your Emmet Snippets in VSCode 

Steve Griffith - Prof3ssorSt3v3
Подписаться 102 тыс.
Просмотров 10 тыс.
50% 1

Emmet is a very powerful tool for helping you efficiently write your HTML and CSS in VSCode. But, did you know that you can customize it and make your own snippets to use in Emmet?
Sample snippets.json file: gist.github.co...
Video about using Emmet in VSCode: • Rapid Webpage Template...
Basic video about Emmet: • Emmet plugin for Brackets

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@allezzthepunk
@allezzthepunk 3 года назад
I'd like to thank you for your videos, I started almost from scratch but your videos helped me a lot to find a soft dev job finally.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
Glad I could help you.
@alliedatheistalliance6776
@alliedatheistalliance6776 2 года назад
This is a game changer! Thank you! I was going to ask you a question, but I found the answer from your code so if it helps anyone else the ${1} sets the cursor position. So for example "lab": "${1}", sets up a label with the cursor between the tags.
@p1nt0n6
@p1nt0n6 6 месяцев назад
just wanna say thanks for your video, it helps me 😊
@harpit5905
@harpit5905 Год назад
Good teaching. Well organized. Relevant. Is RU-vid unfair to this channel
@SteveGriffith-Prof3ssorSt3v3
They definitely seem to be recommending the videos less
@harpit5905
@harpit5905 Год назад
@@SteveGriffith-Prof3ssorSt3v3 Even I am a bit hopeless with the promotion data. But I have full trust in RU-vid. It could be so that people have mastered how to fool it. Windows also sells crazier than Mac 🥸
@hiwayshoes
@hiwayshoes 3 года назад
Hi Steve, what a useful tutorial! Thank you so much! I hope you have time to answer two questions I have. 1. I use Emmet and noticed that some (long) time ago that my HTML boilerplate no longer includes the meta tag for “X-UA-Compatible” “IE=edge”. Is it necessary to include that meta tag? and 2. What are the main reasons to include a Google font family link directly into the HTML head section as opposed to including it as an import into the CSS page? Is one way preferred over the other? Thank you again for your excellent content. I’ve learned so much from your efforts... Cheers!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
The X-UA-Compatible meta tag is useful if your website needs to support Internet Explorer. The only difference between the two ways of adding the font are that a link tag is loaded from the HTML page on the initial load. The @import has to wait for the CSS file to be downloaded before the font is requested. After the initial load there is no difference.
@johnme60
@johnme60 2 года назад
how to change the behavior of pseudo abbreviations , like when we write "div." then it expands into , I want to change the behavior of this "dot (.)" How can I do that?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 года назад
The dot is tied to CSS classes. # is tied to ids. No way to change that.
@segafrompk
@segafrompk 3 года назад
Hi, great video! Is it possible to have nav:x where x is desired amount of elements without hard coding the number? So we can write snippet once and make it a dynamic snippet.
@segafrompk
@segafrompk 3 года назад
@MrBrN197 My question was if we could make that nav*x dynamic in snippets, because in his example he makes 2 almost identical snippets, the only difference being number of nav elements you get.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
Not that I am aware of.
@VideoKursPL
@VideoKursPL 3 года назад
Is there a way to edit built-in emmet abbreviations. Instead of creating "!!" can I just edit the way "!" works?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
Not that I know of. There are also VSCode snippets that you can create and use too though
@NedumEze
@NedumEze Год назад
Thanks Prof for the Tutorial. Please, may I ask? In my VS Code code completion, suggestions and Emmet suggestions, when I scroll to the right suggestion and type enter on my Keyboard, the suggestion or code expansion fails. It just cuts off from cursor position! Any idea why that's ? But it's okay by Mouse click. The Tab key also fails!
@SteveGriffith-Prof3ssorSt3v3
It's possible another installed extension is interfering with the keyboard shortcuts. You can try disabling other extensions and restarting VSCode to see if that fixes it.
@NedumEze
@NedumEze Год назад
@@SteveGriffith-Prof3ssorSt3v3 Thanks very much. Will do.
@Bravox84
@Bravox84 Год назад
How can i make a closed meta tag like this ?
@SteveGriffith-Prof3ssorSt3v3
You can write or omit the closing slash in your snippet. However, the formatting that is being done by VSCode and your extensions like Prettier, to your code after it is added to the page, will decide whether or not the slash remains.
@dailydoseofmemes1532
@dailydoseofmemes1532 2 года назад
hey steve what shou i edit in the json to make a javascript snippet/emmet
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 года назад
Use this reference to create your own snippets for JS - code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet%E2%80%90syntax
@mariaakulova4435
@mariaakulova4435 2 года назад
Thank you!
@brod515
@brod515 3 года назад
Hey Steve I've been trying to get zsh on windows like you have. I have I'm having problems with the fonts. I know this is a direct request but maybe you have the time.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
Sorry. I don't have time to help people solve individual problems.
@brod515
@brod515 3 года назад
@@SteveGriffith-Prof3ssorSt3v3 that's fine.
@MohammedAhmed-zm7qw
@MohammedAhmed-zm7qw 3 года назад
Thank You
@emanuel81111
@emanuel81111 Год назад
doesnt work , i dont see the abreviation
@SteveGriffith-Prof3ssorSt3v3
IF there is a typo in the code or if you have not restarted then the abbreviation will not show up.
@mark1993huang
@mark1993huang 3 месяца назад
@@SteveGriffith-Prof3ssorSt3v3 Thank you, I'm using VScode for Windows. If my emmet json filepath is D:\vscode-setting\snippets.json my vscode setting.json include "emmet.extensionsPath": ["D:\\vscode-setting\\"], It WILL work. 🥳 But if my vscode setting.json include: "emmet.extensionsPath": ["D:\\vscode-setting\\snippets.json"], After change the folder path into file path, it doesn't work anymore. Also if I rename my emmet json file, let's say now my emmet json filepath is D:\vscode-setting ewname.json. And vscode setting.json include: "emmet.extensionsPath": ["D:\\vscode-setting\\"], it doesn't work. 🤔So, what should I do if I want to rename my snippets.json to some other name?
@anycolouryoulike9160
@anycolouryoulike9160 7 месяцев назад
Ive been struggling to build a snippet that would work like this: (any)htmltag.CLASSNAME => cursor here so p.description => I'm using css modules in nextJS, it's a pain to always type that thing
@anycolouryoulike9160
@anycolouryoulike9160 7 месяцев назад
nevermind just add to settings.json: "emmet.syntaxProfiles": { "jsx": { "markup.attributes": { "class*": "className", }, "markup.valuePrefix": { "class*": "styles" } } } and with 2 dots emmet will work the way I want div..main =>
@ileska7828
@ileska7828 2 года назад
Thank you so much sir!
Далее
Custom Events Dispatched from Web Components
20:32
Просмотров 2 тыс.
25 VS Code Productivity Tips and Speed Hacks
11:35
Просмотров 2,3 млн
Use Emmet to up your HTML game
11:22
Просмотров 67 тыс.
VS Code tips - Defining your own emmet snippets
2:19
How To Create Custom VSCode Snippets
9:21
Просмотров 151 тыс.
Write code faster in VS Code with Emmet shortcuts
8:40
You can use Emmet with CSS!
7:40
Просмотров 94 тыс.
Code Faster With Custom VS Code Snippets
20:40
Просмотров 140 тыс.
Things Every Developer Should Know About package.json
15:41