ajout d'un script php pour generer un fichier de snippet fontawesome 5
on l'extend dans html
This commit is contained in:
parent
55fe230bd4
commit
a983e6e87f
4 changed files with 5779 additions and 3 deletions
5752
UltiSnips/fas.snippets
Normal file
5752
UltiSnips/fas.snippets
Normal file
File diff suppressed because it is too large
Load diff
20
UltiSnips/ft.php
Executable file
20
UltiSnips/ft.php
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//snippet fa-500px "fontawesome icon: fa-500px"
|
||||||
|
//fa-500px
|
||||||
|
//endsnippet
|
||||||
|
|
||||||
|
$f = file_get_contents('./_icons.scss');
|
||||||
|
$f = explode("\n", $f);
|
||||||
|
|
||||||
|
$r = "/.*}(-.*):before.*/";
|
||||||
|
$fichier = '';
|
||||||
|
foreach ($f as $l) {
|
||||||
|
preg_match($r, $l, $res);
|
||||||
|
if (isset($res[1])) {
|
||||||
|
$snip = "fa".$res[1];
|
||||||
|
$fichier .= 'snippet '. $snip .' "fontawesome 5: ' . $snip .'"'."\n";
|
||||||
|
$fichier .= "$snip \nendsnippet\n\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_put_contents('fas.snippets', $fichier);
|
|
@ -1,5 +1,6 @@
|
||||||
extends javascript
|
extends javascript
|
||||||
extends fa
|
extends fa
|
||||||
|
extends fas
|
||||||
|
|
||||||
##########
|
##########
|
||||||
## SPIP ##
|
## SPIP ##
|
||||||
|
@ -30,7 +31,7 @@ snippet bb "SPIP <B_>"
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet aa "[(xxx)]" w
|
snippet aa "[(xxx)]" w
|
||||||
[(${1:${VISUAL}})]${0}
|
[(${1:${VISUAL}}${2})]${0}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet icon "#ICON{}" w
|
snippet icon "#ICON{}" w
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#extends html
|
#extends html
|
||||||
|
|
||||||
|
#symfony
|
||||||
|
snippet dd
|
||||||
|
dd(${1:$});${0}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet action "SPIP action declenchee dans un lien"
|
snippet action "SPIP action declenchee dans un lien"
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) return;
|
if (!defined('_ECRIRE_INC_VERSION')) return;
|
||||||
|
@ -108,8 +113,6 @@ function formulaires_`!v vim_snippets#Filename()`_traiter_dist($$1 $redirect = '
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
snippet bigint "SQL bigint(21)" w
|
snippet bigint "SQL bigint(21)" w
|
||||||
'bigint(${1:21}) NOT NULL',${0}
|
'bigint(${1:21}) NOT NULL',${0}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
Loading…
Add table
Reference in a new issue