srecode/web.srt
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 16 Jun 2021 12:50:08 +0300
changeset 1734 ae2c6a001464
parent 1411 3ed65138057b
permissions -rw-r--r--
Add some standard places to PATH if they are not set by login script. Rearrange the order of paths so system's are first, user's are last. For Cygwin this helps with Cygwin's paths to be situated before "C:/Windows" (Emacs is not started from a login shell on Windows!).


;; (setq srecode-mode-table-list nil)
;; (srecode-load-tables-for-mode 'web-mode)
;; (srecode-dump-templates "web-mode")

set mode "web-mode"

set escape_start "{{"
set escape_end "}}"

set comment_start "<!--"
set comment_end "--!>"
set comment_prefix ""

context file

template empty
"Fill out an empty file."
----
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>{{?TITLE}}</title>
</head>
<body>
  {{^}}

</body>
</html>
----
bind "h"

;; prompt NAME "Name for declaration: "

template tag
""
----
<{{?NAME}}>{{^}}</{{NAME}}>
----
bind "t"

template js :indent
----
<script src="{{^}}"></script>
----
bind "j"

template js-inline :indent
----
<script>
{{^}}
</script>
----

template css :indent
----
<link rel="stylesheet" type="text/css" href="{{^}}">
----
bind "c"

template css-inline :indent
----
<style>
{{^}}
</style>
----

template meta-charset :indent
----
<meta charset="{{^}}"/>
----

template meta-viewport :indent
----
<meta name="viewport" content="width=device-width; initial-scale=1.0"/>
----