mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-17 02:44:17 +00:00
Add explicit "# key" directive to legacy snippet collection before deprecating filenames-as-triggers
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: a function that process a file
|
||||
# key: x-file
|
||||
# --
|
||||
(defun doThisFile (fpath)
|
||||
"Process the file at path FPATH ..."
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#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."
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#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.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: grab buffer substring
|
||||
# key: x-grabstring
|
||||
# --
|
||||
(setq $0 (buffer-substring-no-properties myStartPos myEndPos))
|
||||
@@ -1,4 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: grab word under cursor
|
||||
# key: x-grabthing
|
||||
# --
|
||||
(setq $0 (thing-at-point 'symbol))
|
||||
@@ -1,5 +1,6 @@
|
||||
#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)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#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 ()
|
||||
|
||||
Reference in New Issue
Block a user