Add srecode templates.
--- a/.emacs-my Tue Jul 22 00:37:47 2014 +0300
+++ b/.emacs-my Thu Jul 24 14:01:58 2014 +0300
@@ -2290,6 +2290,7 @@
(global-ede-mode t)
(require 'srecode)
+ (add-to-list 'srecode-map-load-path (locate-user-emacs-file "srecode/"))
(global-srecode-minor-mode 1)
(add-hook 'prog-mode-hook 'srecode-minor-mode)
--- a/Makefile Tue Jul 22 00:37:47 2014 +0300
+++ b/Makefile Thu Jul 24 14:01:58 2014 +0300
@@ -95,11 +95,12 @@
$(EMACS) -Q --batch \
--eval='(let ( (generated-autoload-file "~/.emacs.d/my-lisp/autoload-my.el") ) (update-directory-autoloads "~/.emacs.d/my-lisp") )'
./.emacs-autogen.sh $(HOME)/.emacs-autogen
+ cp -r srecode/ $(HOME)/.emacs.d/
.PHONY: uninstall
uninstall:
rm -f $(HOME)/.emacs $(HOME)/.emacs-my $(HOME)/.emacs-autogen
- rm -f -r $(HOME)/.emacs.d/my-lisp
+ rm -f -r $(HOME)/.emacs.d/my-lisp $(HOME)/.emacs.d/srecode
.PHONY: tar
tar:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/srecode/java.srt Thu Jul 24 14:01:58 2014 +0300
@@ -0,0 +1,38 @@
+
+set mode "java-mode"
+set escape_start "[["
+set escape_end "]]"
+
+context my
+
+set comment_start "/**"
+set comment_end " */"
+set comment_prefix " *"
+
+;; :file :user :time
+
+template empty :java
+"Fill out an empty file."
+----
+package [[FILENAME_AS_PACKAGE]];
+
+import java.util.*;
+
+public class [[FILENAME_AS_CLASS]] {
+
+ public [[FILENAME_AS_CLASS]]() {[[^]] }
+
+}
+----
+
+template getset :indent
+"Getter/Setter."
+----
+ private [[?TYPE]] [[?NAME]];
+ /** [[^]] */
+ public [[TYPE]] get[[NAME:my-java-capitalize]]() { return [[NAME]]; }
+ /** */
+ public void set[[NAME:my-java-capitalize]]([[TYPE]] [[NAME]]) { this.[[NAME]] = [[NAME]]; }
+
+----
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/srecode/web.srt Thu Jul 24 14:01:58 2014 +0300
@@ -0,0 +1,69 @@
+
+;; (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>
+ <title>{{?TITLE}}</title>
+ <meta name="viewport" content="width=device-width; initial-scale=1.0"/>
+ <meta charset="utf-8"/>
+</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>
+----
+