Meine VS Code Snippets

Author Avatar jreitter am 04.05.2021

Ja, VS Code speichert meine Einstellungen und Erweiterungen in meinm Profil, aber hey … “better safe than sorry!”. Vielleicht ist für den Ein oder Anderen auch was dabei und wenn es auch nur ein Denkanstoß ist.

"PHP Tag": {
		"prefix": "pp",
		"body": [
			"<?php $code ?>",
		],
	},
	
	"AOS Tag": {
		"prefix": "aos",
		"body": [
			"data-aos=\"$animation\"",
		],
	},

	"AOS DelayTag": {
		"prefix": "aosd",
		"body": [
			"data-aos-delay=\"$delay\"",
		],
	},

	"WP Theme Image Tag": {
		"prefix": "tim",
		"body": [
			"<img class=\"$class\" alt=\"$alt\" width=\"$width\" src=\"<?php echo get_template_directory_uri() . '/inc/img/$image' ?>\">",
		],
	},

	"Structural Comment": {
		"prefix": "kk",
		"body": [
			"<!-- Begin $element -->",
		],
	},

	"Structural Comment Long": {
		"prefix": "kkk",
		"body": [
			"//-------------------- $comment --------------------",
		],
	},
"Break Point Min": {
		"prefix": "bpmin",
		"body": [
			"@include bpmin($Breakpoint) {",
			"\t$CSS",
			"}",
		],
	},

	"Break Point Max": {
		"prefix": "bpmax",
		"body": [
			"@include bpmax($Breakpoint) {",
			"\t$CSS",
			"}",
		],
	},

	"Break Point Min Max": {
		"prefix": "bpminmax",
		"body": [
			"@include bpminmax($Breakpoint1, $Breakpoint2) {",
			"\t$CSS",
			"}",
		],
	},

	"Breakpoint Mixins": {
		"prefix": "bpmix",
		"body": [
			"@mixin bpmax($$breakpoint) {",
			"\t@media all and (max-width:$$breakpoint+px) {",
			"\t\t@content;",
			"\t}",
			"}",
			
			"@mixin bpmin($$breakpoint) {",
			"\t@media all and (min-width:$$breakpoint+px) {",
			"\t\t@content;",
			"\t}",
			"}",
			
			"@mixin bpminmax($$breakpointmin, $$breakpointmax) {",
			"\t@media all and (min-width:$$breakpointmin+px) and (max-width:$$breakpointmax+px) {",
			"\t\t@content;",
			"\t}",
			"}",
		],	
	},

	"Bootstrap Breakpoint Variables": {
		"prefix": "bpvar",
		"body": [
			"$$bp-sm: 576;",
			"$$bp-md: 768;",
			"$$bp-lg: 992;",
			"$$bp-xl: 1200;",
		],
	},

	"Import": {
		"prefix": "im",
		"body": [
			"@import '../../node_modules/$1';",
		],
	},

	"Local Import": {
		"prefix": "lim",
		"body": [
			"@import 'node_modules/$1';",
		],
	},

	"Kommentar Trennlinie": {
		"prefix": "cc",
		"body": [
			"// --------------------------------- $Kommentar ---------------------------------",
		],
	},

	"Comment Klein": {
		"prefix": "c",
		"body": [
			"// $Kommentar",
		],
	},

	"Extend": {
		"prefix": "ext",
		"body": [
			"@extend .$class;",
		],
	},

	"Clam Typo": {
		"prefix": "clam",
		"body": [
			"--minFontSize: $1px;"
			"--maxFontSize: $2px;"
			"--scaler: 5vw;"
			"font-size: clamp( var(--minFontSize), var(--scaler), var(--maxFontSize) );",
		],
	},
"jQuery Selector": {
		"prefix": "sel",
		"body": [
			"$('.$Selector')",
		],
	},

	"Document Ready Function": {
		"prefix": "dr",
		"body": [
			"$(document).ready(function(){",
			"\t$Code",
			"});",
		],
	},

	"Prepros Prepend": {
		"prefix": "pre",
		"body": [
			"//@prepros-prepend ../../node_modules/",
		],
	},

	"Prepros Prepend Plugin": {
		"prefix": "plug",
		"body": [
			"//@prepros-prepend ../../inc/plugins/",
		],
	},

	"Prepros Append": {
		"prefix": "ap",
		"body": [
			"//@prepros-append ../../node_modules/",
		],
	},

	"Comments": {
		"prefix": "cc",
		"body": [
			"// ------------------ $comment ------------------",
		],
	},

	"jQuery Function": {
		"prefix": "jq",
		"body": [
			"(function($){"
			"\t$Code"
			"})(jQuery);",
		],
	},
"PHP Tag": {
		"prefix": "pp",
		"body": [
			"<?php $code ?>",
		],
	},
	
	"AOS Tag": {
		"prefix": "aos",
		"body": [
			"data-aos=\"$animation\"",
		],
	},

	"AOS DelayTag": {
		"prefix": "aosd",
		"body": [
			"data-aos-delay=\"$delay\"",
		],
	},

	"WP Theme Image Tag": {
		"prefix": "tim",
		"body": [
			"<img class=\"$class\" alt=\"$alt\" width=\"$width\" src=\"<?php echo get_template_directory_uri() . '/inc/img/$image' ?>\">",
		],
	},

	"Structural Comment": {
		"prefix": "kk",
		"body": [
			"<!-- Begin $element -->",
		],
	},

	"WP Loop": {
		"prefix": "loop",
		"body": [
			"<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>",
			"",
			"<?php endwhile; else : ?>",
			"",
			"<?php endif; ?>",
		],
	},

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.