[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yasnippet-snippets c0ef1e8 2/2: Merge pull request #429 fr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yasnippet-snippets c0ef1e8 2/2: Merge pull request #429 from AndreaCrotti/remove-older |
Date: |
Tue, 7 Sep 2021 15:57:54 -0400 (EDT) |
branch: elpa/yasnippet-snippets
commit c0ef1e8cfd05ef77b9240f3d9e8f0798bbcf9a58
Merge: 8bf33e9 0c28a08
Author: Andrea Crotti <andrea.crotti.0@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #429 from AndreaCrotti/remove-older
remove duplicated scripts
---
.gitignore | 1 +
report/src/core.clj | 31 ++++++++++++-----
report/test/core_test.clj | 44 +++++++++++++++++++++++--
snippets/bibtex-mode/mvproceedings | 19 -----------
snippets/c++-mode/acl | 8 -----
snippets/c++-mode/d_operator_ostream | 5 ---
snippets/c++-mode/oit | 8 -----
snippets/c++-mode/rmv | 9 -----
snippets/c++-mode/sti | 6 ----
snippets/c++-mode/sto | 6 ----
snippets/c++-mode/stv | 6 ----
snippets/c++-mode/trm | 6 ----
snippets/c++-mode/upr | 9 -----
snippets/csharp-mode/comment.2 | 3 +-
snippets/emacs-lisp-mode/.read_me | 8 -----
snippets/emacs-lisp-mode/find-replace | 18 ----------
snippets/emacs-lisp-mode/grabthing | 1 +
snippets/emacs-lisp-mode/traverse_dir | 7 ----
snippets/emacs-lisp-mode/x-dired.process_marked | 18 ----------
snippets/emacs-lisp-mode/x-file.process | 19 -----------
snippets/emacs-lisp-mode/x-file.read-lines | 19 -----------
snippets/emacs-lisp-mode/x-find-replace | 19 -----------
snippets/emacs-lisp-mode/x-grabstring | 6 ----
snippets/emacs-lisp-mode/x-grabthing | 6 ----
snippets/emacs-lisp-mode/x-traverse_dir | 8 -----
snippets/emacs-lisp-mode/x-word-or-region | 29 ----------------
snippets/html-mode/form | 4 +--
snippets/html-mode/script.javascript | 4 +--
snippets/html-mode/script.javascript-src | 4 +--
snippets/hy-mode/class | 4 +--
snippets/hy-mode/cond | 4 +--
snippets/hy-mode/defm | 4 +--
snippets/hy-mode/do | 4 +--
snippets/hy-mode/if | 4 +--
snippets/hy-mode/ifn | 4 +--
snippets/hy-mode/imp | 4 +--
snippets/hy-mode/main | 4 +--
snippets/hy-mode/req | 4 +--
snippets/hy-mode/unless | 4 +--
snippets/hy-mode/when | 4 +--
snippets/js-mode/type-multiline-comment | 2 +-
snippets/lisp-mode/for | 2 +-
snippets/lisp-mode/foreach | 2 +-
snippets/markdown-mode/hyphen | 2 +-
snippets/markdown-mode/plus | 2 +-
snippets/nxml-mode/form | 4 +--
snippets/php-mode/method-doc | 8 -----
snippets/python-mode/assertRaises.with | 4 +--
snippets/raku-mode/raku-mode | 1 -
snippets/rust-mode/new | 2 +-
snippets/sh-mode/args | 2 +-
snippets/sh-mode/case | 2 +-
snippets/sh-mode/select | 2 +-
53 files changed, 108 insertions(+), 302 deletions(-)
diff --git a/.gitignore b/.gitignore
index c4f0816..da76e7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
**/.yas-compiled-snippets.el
/report/target/
+/report/.nrepl-port
diff --git a/report/src/core.clj b/report/src/core.clj
index 943b2e1..7f42f34 100644
--- a/report/src/core.clj
+++ b/report/src/core.clj
@@ -22,25 +22,28 @@
(defn mode-files
[mode-dir]
- (filter #(.isFile %)
- (file-seq (io/file mode-dir))))
+ (->> (io/file mode-dir)
+ file-seq
+ (filter #(and (.isFile %) (not (.startsWith (.getName %) "."))))))
(defn parse-mode
[mode-dir]
(for [f (mode-files mode-dir)]
+ ;; directories should be excluded from here ideally?
{:filename (.getName (io/file mode-dir f))
- :name (extract-keyword f "name")
- :key (or (extract-keyword f "key")
- (extract-keyword f "name"))
- :group (extract-keyword f "group")
- :desc (extract-keyword f "desc")}))
+ :name (extract-keyword f "name")
+ ;; FIXME: I think this is not correct, it uses the filename actually?
+ :key (or (extract-keyword f "key")
+ (extract-keyword f "name"))
+ :group (extract-keyword f "group")
+ :desc (extract-keyword f "desc")}))
(defn parse-everything
[snippets-dir]
(into {}
(remove nil?)
(for [d (file-seq (io/file snippets-dir))]
- (when (.isDirectory d)
+ (when (and (not= (.getPath d) snippets-dir) (.isDirectory d))
{(.getName d) (parse-mode d)}))))
(defn store-to-edn
@@ -109,3 +112,15 @@
(comment
(gen-html "../snippets"))
+
+(comment
+ (def all-modes (all-modes "../snippets"))
+ (doseq [[mode ss] all-modes]
+ (do
+ (print "mode =" mode)
+ (let [grouped
+ (->> (group-by :name ss)
+ (filter #(> (count (second %)) 1)))]
+ (doseq [[g vs] grouped]
+ (when (pos? (count vs))
+ (println g (map :filename vs))))))))
diff --git a/report/test/core_test.clj b/report/test/core_test.clj
index 0c3c38c..598dfa4 100644
--- a/report/test/core_test.clj
+++ b/report/test/core_test.clj
@@ -1,9 +1,47 @@
(ns core-test
(:require [clojure.test :refer [deftest testing is]]
- [core :as sut]))
+ [core :as sut]
+ [clojure.string :as str]
+ [clojure.java.io :as io]))
(deftest unique-test
(let [all-modes (sut/parse-everything "../snippets")]
(doseq [[k snippets] all-modes]
- (let [keys (map :name snippets)]
- (is (= (count keys) (count (set keys))) (str "failed for mode " k))))))
+ (let [keys (map :name snippets)
+ freq (->> (frequencies keys)
+ (filter #(> (second %) 1)))]
+ (is (= (count keys) (count (set keys)))
+ (str "failed for mode " k " and failing things:\n"
+ (str/join ", " (map first freq))))))))
+
+(defn with-nil-key [ns key]
+ (str/join ", " (map :filename (filter #(nil? (key %)) ns))))
+
+(deftest non-nils-test
+ (let [all-modes (sut/parse-everything "../snippets")]
+ (doseq [[k snippets] all-modes]
+ (let [ns (filter #(not (.startsWith (:filename %) ".yas-")) snippets)
+ nil-names (with-nil-key ns :name)
+ nil-keys (with-nil-key ns :key)]
+ (is (empty? nil-names) (str "nils in " k " => " nil-names))
+ (is (empty? nil-keys) (str "nils in " k "=> " nil-keys))))))
+
+(comment
+ (def reg #"key:(\w)")
+
+ (doseq [f (file-seq (io/file "../snippets"))
+ :when (.isFile f)
+ :let [c (slurp f)]]
+
+ (when (re-seq reg c)
+ (let [new-c (str/replace c reg "key: $1")]
+ (spit (.getPath f) new-c))))
+
+ (doseq [f (file-seq (io/file "../snippets"))
+ :when (.isFile f)
+ :let [c (slurp f)
+ res (re-seq #"contributor:" c)]]
+
+ ;; should I clean all of them?
+ (when (seq res)
+ (println "file = " f))))
diff --git a/snippets/bibtex-mode/mvproceedings
b/snippets/bibtex-mode/mvproceedings
deleted file mode 100644
index 4446bb8..0000000
--- a/snippets/bibtex-mode/mvproceedings
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- mode: snippet -*-
-# name: proceedings
-# key: proceedings
-# author: Spenser Truex
-# --
-@mvproceedings{ ${title},
-title = {${title}},
-year = {${year}}${,
-editor = {${editor}}}${,
-volume = {${volume}}}${,
-series = {${series}}}${,
-address = {${address}}}${,
-month = {${month}}}${,
-organization = {${organization}}}${,
-publisher = {${publisher}}}${,
-note = {${note}}}
-}
-
-$0
\ No newline at end of file
diff --git a/snippets/c++-mode/acl b/snippets/c++-mode/acl
deleted file mode 100644
index 9d5d042..0000000
--- a/snippets/c++-mode/acl
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- mode: snippet -*-
-# name: accumulate
-# key: acl
-# --
-auto sum = std::accumulate(std::begin(${1:container}), std::end($1), 0, [](int
total, $2) {
- $3
-});
-$0
diff --git a/snippets/c++-mode/d_operator_ostream
b/snippets/c++-mode/d_operator_ostream
deleted file mode 100644
index d23f4d6..0000000
--- a/snippets/c++-mode/d_operator_ostream
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: d_operator<<
-# key: <<
-# --
-friend std::ostream& operator<<(std::ostream&, const ${1:Name}&);
\ No newline at end of file
diff --git a/snippets/c++-mode/oit b/snippets/c++-mode/oit
deleted file mode 100644
index 74ad7e5..0000000
--- a/snippets/c++-mode/oit
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- mode: snippet -*-
-# name: copy
-# key: oit
-# --
-std::copy(std::begin(${1:container}), std::end($1), std::ostream_iterator<$2>{
-%\istd::cout, "$3"
-});
-$0
diff --git a/snippets/c++-mode/rmv b/snippets/c++-mode/rmv
deleted file mode 100644
index 01fa9f9..0000000
--- a/snippets/c++-mode/rmv
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- mode: snippet -*-
-# name: remove
-# key: rmv
-# --
-auto pos = std::remove(std::begin(${1:container}), std::end($1), $2);
-if (pos != std::end($1)) {
- $3
-}
-$0
diff --git a/snippets/c++-mode/sti b/snippets/c++-mode/sti
deleted file mode 100644
index 37a2182..0000000
--- a/snippets/c++-mode/sti
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# name: cin
-# key: sti
-# --
-std::cin >>
-$0
diff --git a/snippets/c++-mode/sto b/snippets/c++-mode/sto
deleted file mode 100644
index 30db50b..0000000
--- a/snippets/c++-mode/sto
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# name: cout
-# key: sto
-# --
-std::cout <<
-$0
diff --git a/snippets/c++-mode/stv b/snippets/c++-mode/stv
deleted file mode 100644
index 1354c3d..0000000
--- a/snippets/c++-mode/stv
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# name: vector
-# key: stv
-# --
-std::vector<$2> $3
-$0
diff --git a/snippets/c++-mode/trm b/snippets/c++-mode/trm
deleted file mode 100644
index d7ffea1..0000000
--- a/snippets/c++-mode/trm
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# name: generate_n
-# key: trm
-# --
-${1:container}.erase($1.find_last_not_of(" \t\n\r") + 1);
-$0
diff --git a/snippets/c++-mode/upr b/snippets/c++-mode/upr
deleted file mode 100644
index 8c9e0f8..0000000
--- a/snippets/c++-mode/upr
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- mode: snippet -*-
-# name: transform
-# key: upr
-# --
-std::transform(std::begin(${1:container}), std::end($1), std::begin($1),
[](char c) {
-return std::toupper(c);
-});
-$2
-$0
diff --git a/snippets/csharp-mode/comment.2 b/snippets/csharp-mode/comment.2
index b9aea85..82b54e7 100644
--- a/snippets/csharp-mode/comment.2
+++ b/snippets/csharp-mode/comment.2
@@ -1,6 +1,5 @@
# -*- mode: snippet -*-
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
-# name: /// <param name="..."> ... </param>
+# name: /// <returns>$1</returns>
# key: comment
# --
-/// <returns>$1</returns>
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/.read_me
b/snippets/emacs-lisp-mode/.read_me
deleted file mode 100644
index 04bb68a..0000000
--- a/snippets/emacs-lisp-mode/.read_me
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- mode: snippet -*-
--*- coding: utf-8 -*-
-Originally started by Xah Lee (xahlee.org) on 2009-02-22
-Released under GPL 3.
-
-Feel free to add missing ones or modify existing ones to improve.
-
-Those starting with “x-” are supposed to be idiom templates. Not sure it's
very useful. They might start with “i-” or "id-" in the future.
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/find-replace
b/snippets/emacs-lisp-mode/find-replace
deleted file mode 100644
index 3879ed3..0000000
--- a/snippets/emacs-lisp-mode/find-replace
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- mode: snippet -*-
-# name: find and replace on region
-# contributor : Xah Lee
-# --
-(defun replace-html-chars-region (start end)
- "Replace “<” to “<” and other chars in HTML.
-This works on the current region."
- (interactive "r")
- (save-restriction
- (narrow-to-region start end)
- (goto-char (point-min))
- (while (search-forward "&" nil t) (replace-match "&" nil t))
- (goto-char (point-min))
- (while (search-forward "<" nil t) (replace-match "<" nil t))
- (goto-char (point-min))
- (while (search-forward ">" nil t) (replace-match ">" nil t))
- )
- )
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/grabthing
b/snippets/emacs-lisp-mode/grabthing
index a1dc523..c80635b 100644
--- a/snippets/emacs-lisp-mode/grabthing
+++ b/snippets/emacs-lisp-mode/grabthing
@@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: grab word under cursor
+# key: grabthing
# contributor : Xah Lee
# --
(setq $0 (thing-at-point 'symbol))
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/traverse_dir
b/snippets/emacs-lisp-mode/traverse_dir
deleted file mode 100644
index 3c46359..0000000
--- a/snippets/emacs-lisp-mode/traverse_dir
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: traversing a directory
-# contributor : Xah Lee
-# --
-;; apply a function to all files in a dir
-(require 'find-lisp)
-(mapc 'my-process-file (find-lisp-find-files "~/myweb/" "\\.html$"))
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-dired.process_marked
b/snippets/emacs-lisp-mode/x-dired.process_marked
deleted file mode 100644
index 156cc68..0000000
--- a/snippets/emacs-lisp-mode/x-dired.process_marked
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: Xah Lee (XahLee.org)
-# name: process marked files in dired
-# key: x-dired
-# --
-;; idiom for processing a list of files in dired's marked files
-
-;; suppose myProcessFile is your function that takes a file path
-;; and do some processing on the file
-
-(defun dired-myProcessFile ()
- "apply myProcessFile function to marked files in dired."
- (interactive)
- (require 'dired)
- (mapc 'myProcessFile (dired-get-marked-files))
-)
-
-;; to use it, type M-x dired-myProcessFile
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-file.process
b/snippets/emacs-lisp-mode/x-file.process
deleted file mode 100644
index c18fc16..0000000
--- a/snippets/emacs-lisp-mode/x-file.process
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: Xah Lee (XahLee.org)
-# name: a function that process a file
-# key: x-file
-# --
-(defun doThisFile (fpath)
- "Process the file at path FPATH ..."
- (let ()
- ;; create temp buffer without undo record or font lock. (more efficient)
- ;; first space in temp buff name is necessary
- (set-buffer (get-buffer-create " myTemp"))
- (insert-file-contents fpath nil nil nil t)
-
- ;; process it ...
- ;; (goto-char 0) ; move to begining of file's content (in case it was open)
- ;; ... do something here
- ;; (write-file fpath) ;; write back to the file
-
- (kill-buffer " myTemp")))
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-file.read-lines
b/snippets/emacs-lisp-mode/x-file.read-lines
deleted file mode 100644
index 29e0d63..0000000
--- a/snippets/emacs-lisp-mode/x-file.read-lines
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: Xah Lee (XahLee.org)
-# name: read lines of a file
-# key: x-file
-# --
-(defun read-lines (filePath)
- "Return a list of lines in FILEPATH."
- (with-temp-buffer
- (insert-file-contents filePath)
- (split-string
- (buffer-string) "\n" t)))
-
-;; process all lines
-(mapc
- (lambda (aLine)
- (message aLine) ; do your stuff here
- )
- (read-lines "inputFilePath")
-)
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-find-replace
b/snippets/emacs-lisp-mode/x-find-replace
deleted file mode 100644
index 2d086b3..0000000
--- a/snippets/emacs-lisp-mode/x-find-replace
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: Xah Lee (XahLee.org)
-# name: find and replace on region
-# key: x-find-replace
-# --
-(defun replace-html-chars-region (start end)
- "Replace “<” to “<” and other chars in HTML.
-This works on the current region."
- (interactive "r")
- (save-restriction
- (narrow-to-region start end)
- (goto-char (point-min))
- (while (search-forward "&" nil t) (replace-match "&" nil t))
- (goto-char (point-min))
- (while (search-forward "<" nil t) (replace-match "<" nil t))
- (goto-char (point-min))
- (while (search-forward ">" nil t) (replace-match ">" nil t))
- )
- )
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-grabstring
b/snippets/emacs-lisp-mode/x-grabstring
deleted file mode 100644
index ded68db..0000000
--- a/snippets/emacs-lisp-mode/x-grabstring
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: Xah Lee (XahLee.org)
-# name: grab buffer substring
-# key: x-grabstring
-# --
-(setq $0 (buffer-substring-no-properties myStartPos myEndPos))
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-grabthing
b/snippets/emacs-lisp-mode/x-grabthing
deleted file mode 100644
index 91a37e5..0000000
--- a/snippets/emacs-lisp-mode/x-grabthing
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: Xah Lee (XahLee.org)
-# name: grab word under cursor
-# key: x-grabthing
-# --
-(setq $0 (thing-at-point 'symbol))
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-traverse_dir
b/snippets/emacs-lisp-mode/x-traverse_dir
deleted file mode 100644
index 33d627c..0000000
--- a/snippets/emacs-lisp-mode/x-traverse_dir
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- mode: snippet -*-
-# name: traversing a directory
-# contributor: Xah Lee (XahLee.org)
-# key: x-traverse_dir
-# --
-;; apply a function to all files in a dir
-(require 'find-lisp)
-(mapc 'my-process-file (find-lisp-find-files "~/myweb/" "\\.html$"))
\ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/x-word-or-region
b/snippets/emacs-lisp-mode/x-word-or-region
deleted file mode 100644
index 549e6f7..0000000
--- a/snippets/emacs-lisp-mode/x-word-or-region
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: Xah Lee (XahLee.org)
-# name: Command that works on region or word
-# key: x-word-or-region
-# --
-;; example of a command that works on current word or text selection
-(defun down-case-word-or-region ()
- "Lower case the current word or text selection."
-(interactive)
-(let (pos1 pos2 meat)
- (if (and transient-mark-mode mark-active)
- (setq pos1 (region-beginning)
- pos2 (region-end))
- (setq pos1 (car (bounds-of-thing-at-point 'symbol))
- pos2 (cdr (bounds-of-thing-at-point 'symbol))))
-
- ; now, pos1 and pos2 are the starting and ending positions
- ; of the current word, or current text selection if exists
-
- ;; put your code here.
- $0
- ;; Some example of things you might want to do
- (downcase-region pos1 pos2) ; example of a func that takes region as args
- (setq meat (buffer-substring-no-properties pos1 pos2)) ; grab the text.
- (delete-region pos1 pos2) ; get rid of it
- (insert "newText") ; insert your new text
-
- )
-)
\ No newline at end of file
diff --git a/snippets/html-mode/form b/snippets/html-mode/form
index 43ca80a..35f6a2a 100644
--- a/snippets/html-mode/form
+++ b/snippets/html-mode/form
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# contributor : Jimmy Wu <frozenthrone88@gmail.com>
-# name:<form method="..." id="..." action="..."></form>
+# key: form
+# name: form
# --
<form method="$1" id="$2" action="$3">
$0
diff --git a/snippets/html-mode/script.javascript
b/snippets/html-mode/script.javascript
index 54ef47a..ecf97a6 100644
--- a/snippets/html-mode/script.javascript
+++ b/snippets/html-mode/script.javascript
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# contributor : Jimmy Wu <frozenthrone88@gmail.com>
-# name:<script type="text/javascript">...</script>
+# key: script
+# name: script
# --
<script type="text/javascript">
$0
diff --git a/snippets/html-mode/script.javascript-src
b/snippets/html-mode/script.javascript-src
index e45dca1..a70de72 100644
--- a/snippets/html-mode/script.javascript-src
+++ b/snippets/html-mode/script.javascript-src
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# contributor : Jimmy Wu <frozenthrone88@gmail.com>
-# name:<script type="text/javascript" src="..."></script>
+# key: script
+# name: script src
# --
<script type="text/javascript" src="$1"></script>
\ No newline at end of file
diff --git a/snippets/hy-mode/class b/snippets/hy-mode/class
index 3f73cc7..c0db446 100644
--- a/snippets/hy-mode/class
+++ b/snippets/hy-mode/class
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:class
-# key:class
+# name: class
+# key: class
# binding: direct-keybinding
# --
(defclass ${1:ClassName} [${2:BaseClass}]
diff --git a/snippets/hy-mode/cond b/snippets/hy-mode/cond
index 7b4e924..53b9997 100644
--- a/snippets/hy-mode/cond
+++ b/snippets/hy-mode/cond
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:cond
-# key:cond
+# name: cond
+# key: cond
# binding: direct-keybinding
# --
(cond
diff --git a/snippets/hy-mode/defm b/snippets/hy-mode/defm
index 0b76558..0f43a0d 100644
--- a/snippets/hy-mode/defm
+++ b/snippets/hy-mode/defm
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:defm
-# key:defm
+# name: defm
+# key: defm
# binding: direct-keybinding
# --
(defmacro ${1:macro-name} [${2:arg}]
diff --git a/snippets/hy-mode/do b/snippets/hy-mode/do
index 39a6897..c5e362b 100644
--- a/snippets/hy-mode/do
+++ b/snippets/hy-mode/do
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:do
-# key:do
+# name: do
+# key: do
# binding: direct-keybinding
# --
(do $0)
\ No newline at end of file
diff --git a/snippets/hy-mode/if b/snippets/hy-mode/if
index de952d3..0de314e 100644
--- a/snippets/hy-mode/if
+++ b/snippets/hy-mode/if
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:if
-# key:if
+# name: if
+# key: if
# binding: direct-keybinding
# --
(if ${1:condition}
diff --git a/snippets/hy-mode/ifn b/snippets/hy-mode/ifn
index 4c57d79..2be3269 100644
--- a/snippets/hy-mode/ifn
+++ b/snippets/hy-mode/ifn
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:ifn
-# key:ifn
+# name: ifn
+# key: ifn
# binding: direct-keybinding
# --
(if-not ${1:condition}
diff --git a/snippets/hy-mode/imp b/snippets/hy-mode/imp
index a69c5e5..b19271b 100644
--- a/snippets/hy-mode/imp
+++ b/snippets/hy-mode/imp
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:import
-# key:import
+# name: import
+# key: import
# binding: direct-keybinding
# --
(import [${1:module-name} [${2:exposing}]])
\ No newline at end of file
diff --git a/snippets/hy-mode/main b/snippets/hy-mode/main
index a68e4bf..1a52f17 100644
--- a/snippets/hy-mode/main
+++ b/snippets/hy-mode/main
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:main
-# key:main
+# name: main
+# key: main
# binding: direct-keybinding
# --
(defmain [&rest ${1:args}]
diff --git a/snippets/hy-mode/req b/snippets/hy-mode/req
index 82f5377..ee29316 100644
--- a/snippets/hy-mode/req
+++ b/snippets/hy-mode/req
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:req
-# key:req
+# name: req
+# key: req
# binding: direct-keybinding
# --
(req [${1:module-name} [${2:exposing}]])
\ No newline at end of file
diff --git a/snippets/hy-mode/unless b/snippets/hy-mode/unless
index d3fecaf..ba0e8a3 100644
--- a/snippets/hy-mode/unless
+++ b/snippets/hy-mode/unless
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:unless
-# key:unless
+# name: unless
+# key: unless
# binding: direct-keybinding
# --
(unless ${1:condition}
diff --git a/snippets/hy-mode/when b/snippets/hy-mode/when
index c34913e..b4f0853 100644
--- a/snippets/hy-mode/when
+++ b/snippets/hy-mode/when
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name:when
-# key:when
+# name: when
+# key: when
# binding: direct-keybinding
# --
(when ${1:condition}
diff --git a/snippets/js-mode/type-multiline-comment
b/snippets/js-mode/type-multiline-comment
index 5164b4b..09cbea9 100644
--- a/snippets/js-mode/type-multiline-comment
+++ b/snippets/js-mode/type-multiline-comment
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name: type-inline-comment
+# name: type-multiline-comment
# key: *ty
#condition: (= (js2-node-type (js2-node-at-point)) js2-COMMENT)
# --
diff --git a/snippets/lisp-mode/for b/snippets/lisp-mode/for
index de8f644..14817eb 100644
--- a/snippets/lisp-mode/for
+++ b/snippets/lisp-mode/for
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name: do
+# name: for
# key: for
# --
(dotimes (${1:var} ${2:count-form})
diff --git a/snippets/lisp-mode/foreach b/snippets/lisp-mode/foreach
index a993bf1..af8b526 100644
--- a/snippets/lisp-mode/foreach
+++ b/snippets/lisp-mode/foreach
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name: do
+# name: foreach
# key: foreach
# --
(dolist (${1:var} ${2:list-form})
diff --git a/snippets/markdown-mode/hyphen b/snippets/markdown-mode/hyphen
index dd23477..8827292 100644
--- a/snippets/markdown-mode/hyphen
+++ b/snippets/markdown-mode/hyphen
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name: Unordered List
+# name: Unordered List -
# contributor: Peng Deng <dengpeng@gmail.com>
# key: -
# --
diff --git a/snippets/markdown-mode/plus b/snippets/markdown-mode/plus
index 662351f..ebcaab1 100644
--- a/snippets/markdown-mode/plus
+++ b/snippets/markdown-mode/plus
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name: Unordered List
+# name: Unordered List +
# contributor: Peng Deng <dengpeng@gmail.com>
# key: +
# --
diff --git a/snippets/nxml-mode/form b/snippets/nxml-mode/form
index 77bfd4b..e914a64 100644
--- a/snippets/nxml-mode/form
+++ b/snippets/nxml-mode/form
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# contributor : Anders Bach Nielsen <abachn@abachn.net>
-# name:<form method="..." action="..."></form>
+# key: form
+# name: form
# --
<form method="$1" action="$2">
$0
diff --git a/snippets/php-mode/method-doc b/snippets/php-mode/method-doc
deleted file mode 100644
index 3b88506..0000000
--- a/snippets/php-mode/method-doc
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- mode: snippet -*-
-# contributor: USAMI Kenta <tadsan@zonu.me>
-# name: PHPDoc @property
-# key: *property
-# group: annotation
-# --
-* @property ${1:type} ${2:$variable} ${3:description}${0:
-*}
\ No newline at end of file
diff --git a/snippets/python-mode/assertRaises.with
b/snippets/python-mode/assertRaises.with
index c97807e..5992127 100644
--- a/snippets/python-mode/assertRaises.with
+++ b/snippets/python-mode/assertRaises.with
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
-# name: assertRaises
-# key: ar
+# name: assertRaisesWith
+# key: arw
# --
with self.assertRaises(${1:Exception}):
$0
diff --git a/snippets/raku-mode/raku-mode b/snippets/raku-mode/raku-mode
deleted file mode 100644
index 8c6c7ba..0000000
--- a/snippets/raku-mode/raku-mode
+++ /dev/null
@@ -1 +0,0 @@
-/Users/toni/.emacs.d/snippets/raku-mode
\ No newline at end of file
diff --git a/snippets/rust-mode/new b/snippets/rust-mode/new
index 9e7e063..86d20e6 100644
--- a/snippets/rust-mode/new
+++ b/snippets/rust-mode/new
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name: fn main() { ... }
+# name: pub fn new() { ... }
# key: new
# --
pub fn new($1) -> ${2:Name} {
diff --git a/snippets/sh-mode/args b/snippets/sh-mode/args
index 09fe3a0..018f60a 100644
--- a/snippets/sh-mode/args
+++ b/snippets/sh-mode/args
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name:args
+# name: args
# key: args
# --
if [ $# -lt ${1:2} ]
diff --git a/snippets/sh-mode/case b/snippets/sh-mode/case
index 6132883..648daef 100644
--- a/snippets/sh-mode/case
+++ b/snippets/sh-mode/case
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name : case
+# name: case
# key: case
# --
case ${1:cond} in
diff --git a/snippets/sh-mode/select b/snippets/sh-mode/select
index 3a62902..7949710 100644
--- a/snippets/sh-mode/select
+++ b/snippets/sh-mode/select
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
-# name : select
+# name: select
# key: select
# --
select ${1:var} in ${2:stuff}; do
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/yasnippet-snippets c0ef1e8 2/2: Merge pull request #429 from AndreaCrotti/remove-older,
ELPA Syncer <=