Install yasnippet and vala-snippets packages
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-*- 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.
|
7
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/add-hook
Executable file
7
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/add-hook
Executable file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet; -*-
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: add-hook
|
||||
#key: add-hook
|
||||
#key: ah
|
||||
# --
|
||||
(add-hook '${1:name}-hook ${2:'${3:function}})$0
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/and
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/and
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: and
|
||||
#key: and
|
||||
#key: a
|
||||
# --
|
||||
(and $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/append
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/append
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: append
|
||||
#key: append
|
||||
# --
|
||||
(append $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/apply
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/apply
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: apply
|
||||
#key: apply
|
||||
# --
|
||||
(apply $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/aref
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/aref
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: aref
|
||||
#key: aref
|
||||
# --
|
||||
(aref ${1:array} {2:index})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/aset
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/aset
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: aset
|
||||
#key: aset
|
||||
# --
|
||||
(aset ${1:array} ${2:index} ${3:element})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/assq
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/assq
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: assq
|
||||
#key: assq
|
||||
# --
|
||||
(assq ${1:key} ${2:list})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/autoload
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/autoload
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: autoload
|
||||
#key: autoload
|
||||
# --
|
||||
(autoload ${1:function} "${2:filename}"${3: "docstring"}${4: interactive}${5: type})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/backward-char
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/backward-char
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: backward-char
|
||||
#key: backward-char
|
||||
#key: bc
|
||||
# --
|
||||
(backward-char $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/beginning-of-line
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/beginning-of-line
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: beginning-of-line
|
||||
#key: beginning-of-line
|
||||
#key: bol
|
||||
# --
|
||||
(beginning-of-line)
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: bounds-of-thing-at-point
|
||||
#key: bounds-of-thing-at-point
|
||||
#key: botap
|
||||
# --
|
||||
(bounds-of-thing-at-point $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/buffer-file-name
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/buffer-file-name
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: buffer-file-name
|
||||
#key: buffer-file-name
|
||||
#key: bfn
|
||||
# --
|
||||
(buffer-file-name)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/buffer-modified-p
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/buffer-modified-p
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: buffer-modified-p
|
||||
#key: buffer-modified-p
|
||||
#key: bmp
|
||||
# --
|
||||
(buffer-modified-p $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/buffer-substring
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/buffer-substring
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: buffer-substring
|
||||
#key: buffer-substring
|
||||
#key: bs
|
||||
# --
|
||||
(buffer-substring ${1:start} ${2:end})
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: buffer-substring-no-properties
|
||||
#key: buffer-substring-no-properties
|
||||
#key: bsnp
|
||||
# --
|
||||
(buffer-substring-no-properties ${1:start} ${2:end})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/car
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/car
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: car
|
||||
#key: car
|
||||
# --
|
||||
(car $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/cdr
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/cdr
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: cdr
|
||||
#key: cdr
|
||||
# --
|
||||
(cdr $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/concat
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/concat
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: concat
|
||||
#key: concat
|
||||
# --
|
||||
(concat $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/cond
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/cond
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: cond
|
||||
#key: cond
|
||||
# --
|
||||
(cond
|
||||
(${1:condition} ${2:body})$0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/condition-case
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/condition-case
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: condition-case
|
||||
#key: condition-case
|
||||
#key: cc
|
||||
# --
|
||||
(condition-case $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/cons
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/cons
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: cons
|
||||
#key: cons
|
||||
# --
|
||||
(cons $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/consp
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/consp
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: consp
|
||||
#key: consp
|
||||
# --
|
||||
(consp $0)
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: defconst
|
||||
# key: const
|
||||
# --
|
||||
(defconst ${1:name} ${2:value}${3: "${4:docstring}"})$0
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/copy-directory
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/copy-directory
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: copy-directory
|
||||
#key: copy-directory
|
||||
#key: cd
|
||||
# --
|
||||
(copy-directory ${1:directory} {2:target}${3: keep-time}${4: parents})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/copy-file
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/copy-file
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: copy-file
|
||||
#key: copy-file
|
||||
#key: cf
|
||||
# --
|
||||
(copy-file ${1:filename} ${2:newname}${3: ok-if-already-exists}${4: keep-time}{5: preserve-uid-gid})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/current-buffer
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/current-buffer
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: current-buffer
|
||||
#key: current-buffer
|
||||
#key: cb
|
||||
# --
|
||||
(current-buffer)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/custom-autoload
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/custom-autoload
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: custom-autoload
|
||||
#key: custom-autoload
|
||||
#key: ca
|
||||
# --
|
||||
(custom-autoload ${1:symbol} ${2:load}${3: noset})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defalias
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defalias
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: defalias
|
||||
#key: defalias
|
||||
# --
|
||||
(defalias '${1:symbol} '${2:alias}${3: "docstring"})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defcustom
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defcustom
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: defcustom
|
||||
#key: defcustom
|
||||
# --
|
||||
(defcustom ${1:symbol} ${2:standard} "${3:docstring}"${4: args})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/define-key
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/define-key
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: define-key
|
||||
#key: define-key
|
||||
#key: dk
|
||||
# --
|
||||
(define-key ${1:mode}-map (kbd "${2:key}") $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defsubst
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defsubst
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: defsubst
|
||||
#key: defsubst
|
||||
# --
|
||||
(defsubst $0)
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: defun
|
||||
# key: def
|
||||
# --
|
||||
(defun ${1:fun} (${2:args})
|
||||
"${3:docstring}"
|
||||
${4:(interactive${5: "${6:P}"})}
|
||||
$0)
|
4
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defvar
Executable file
4
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/defvar
Executable file
@@ -0,0 +1,4 @@
|
||||
#name: defvar
|
||||
#key: defvar
|
||||
# --
|
||||
(defvar ${1:symbol}${2: initvalue}${3: "docstring"})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-char
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-char
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: delete-char
|
||||
#key: delete-char
|
||||
#key: dc
|
||||
# --
|
||||
(delete-char $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-directory
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-directory
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: delete-directory
|
||||
#key: delete-directory
|
||||
#key: dd
|
||||
# --
|
||||
(delete-directory ${1:dicretory}${2: recursive})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-file
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-file
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: delete-file
|
||||
#key: delete-file
|
||||
#key: df
|
||||
# --
|
||||
(delete-file $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-region
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/delete-region
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: delete-region
|
||||
#key: delete-region
|
||||
#key: dr
|
||||
# --
|
||||
(delete-region $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/directory-files
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/directory-files
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: directory-files
|
||||
#key: directory-files
|
||||
#key: df
|
||||
# --
|
||||
(directory-files ${1:directory}${2: full}${3: match}${4: nosort})
|
@@ -0,0 +1,16 @@
|
||||
#name : process marked files in dired
|
||||
#contributor : Xah Lee
|
||||
# --
|
||||
;; 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
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/dolist
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/dolist
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: dolist
|
||||
#key: dolist
|
||||
# --
|
||||
(dolist $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/end-of-line
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/end-of-line
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: end-of-line
|
||||
#key: end-of-line
|
||||
#key: eol
|
||||
# --
|
||||
(end-of-line)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/eq
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/eq
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: eq
|
||||
#key: eq
|
||||
# --
|
||||
(eq $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/equal
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/equal
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: equal
|
||||
#key: equal
|
||||
# --
|
||||
(equal $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/error
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/error
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: error
|
||||
#key: error
|
||||
# --
|
||||
(error "${1:message}"${2: format-args})
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
#contributor: Raghav Kumar Gautam
|
||||
#name: ert-deftest
|
||||
#key: edt
|
||||
# --
|
||||
(ert-deftest ${1:test-name} ()
|
||||
$0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/expand-file-name
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/expand-file-name
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: expand-file-name
|
||||
#key: expand-file-name
|
||||
#key: efn
|
||||
# --
|
||||
(expand-file-name $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/fboundp
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/fboundp
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: fboundp
|
||||
#key: fboundp
|
||||
# --
|
||||
(fboundp '$0)
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: file-name-directory
|
||||
#key: file-name-directory
|
||||
#key: fnd
|
||||
# --
|
||||
(file-name-directory $0)
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: file-name-extension
|
||||
#key: file-name-extension
|
||||
#key: fne
|
||||
# --
|
||||
(file-name-extension ${1:filename}${2: period})
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: file-name-nondirectory
|
||||
#key: file-name-nondirectory
|
||||
#key: fnn
|
||||
# --
|
||||
(file-name-nondirectory $0)
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: file-name-sans-extension
|
||||
#key: file-name-sans-extension
|
||||
#key: fnse
|
||||
# --
|
||||
(file-name-sans-extension $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/file-relative-name
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/file-relative-name
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: file-relative-name
|
||||
#key: file-relative-name
|
||||
#key: frn
|
||||
# --
|
||||
(file-relative-name $0)
|
@@ -0,0 +1,17 @@
|
||||
#name : a function that process a file
|
||||
#contributor : Xah Lee
|
||||
# --
|
||||
(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")))
|
@@ -0,0 +1,17 @@
|
||||
#name : read lines of a file
|
||||
#contributor : Xah Lee
|
||||
# --
|
||||
(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")
|
||||
)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/find-file
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/find-file
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: find-file
|
||||
#key: find-file
|
||||
#key: ff
|
||||
# --
|
||||
(find-file $0)
|
@@ -0,0 +1,17 @@
|
||||
#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))
|
||||
)
|
||||
)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/format
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/format
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: format
|
||||
#key: f
|
||||
# --
|
||||
(format "${1:message}" ${2:format-args})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/forward-char
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/forward-char
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: forward-char
|
||||
#key: forward-char
|
||||
#key: fc
|
||||
# --
|
||||
(forward-char $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/forward-line
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/forward-line
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: forward-line
|
||||
#key: forward-line
|
||||
#key: fl
|
||||
# --
|
||||
(forward-line $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/funcall
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/funcall
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: funcall
|
||||
#key: funcall
|
||||
# --
|
||||
(funcall $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/function
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/function
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: function
|
||||
#key: function
|
||||
# --
|
||||
(function $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/get
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/get
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: get
|
||||
#key: get
|
||||
# --
|
||||
(get ${1:symbol} {2:propname})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/global-set-key
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/global-set-key
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: global-set-key
|
||||
#key: global-set-key
|
||||
#key: gsk
|
||||
# --
|
||||
(global-set-key (kbd "${1:key}") $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/goto-char
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/goto-char
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: goto-char
|
||||
#key: goto-char
|
||||
#key: gc
|
||||
# --
|
||||
(goto-char $0)
|
@@ -0,0 +1,4 @@
|
||||
#name : grab buffer substring
|
||||
#contributor : Xah Lee
|
||||
# --
|
||||
(setq $0 (buffer-substring-no-properties myStartPos myEndPos))
|
@@ -0,0 +1,4 @@
|
||||
#name : grab word under cursor
|
||||
#contributor : Xah Lee
|
||||
# --
|
||||
(setq $0 (thing-at-point 'symbol))
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: hash
|
||||
# key: hash
|
||||
# --
|
||||
(make-hash-table $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/if
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/if
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: if
|
||||
#key: if
|
||||
# --
|
||||
(if $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/insert
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/insert
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: insert
|
||||
#key: insert
|
||||
#key: i
|
||||
# --
|
||||
(insert $0)
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: insert-file-contents
|
||||
#key: insert-file-contents
|
||||
#key: ifc
|
||||
# --
|
||||
(insert-file-contents ${1:filename}${2: visit}${3: beg}${4: end}${5: replace})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/interactive
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/interactive
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: interactive
|
||||
#key: interactive
|
||||
# --
|
||||
(interactive${1: "${2:P}"})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/kbd
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/kbd
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: kbd
|
||||
#key: kbd
|
||||
# --
|
||||
(kbd "$0")
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/kill-buffer
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/kill-buffer
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: kill-buffer
|
||||
#key: kill-buffer
|
||||
#key: kb
|
||||
# --
|
||||
(kill-buffer $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/lambda
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/lambda
Executable file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet; -*-
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: lambda
|
||||
#key: lam
|
||||
# --
|
||||
(lambda ($1) ${2:(interactive${3: "$4"}) }$0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/length
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/length
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: length
|
||||
#key: length
|
||||
# --
|
||||
(length $0)
|
7
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/let
Executable file
7
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/let
Executable file
@@ -0,0 +1,7 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: let
|
||||
#key: let
|
||||
#key: l
|
||||
# --
|
||||
(let${1:*} (${2:args})
|
||||
$0)
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: line-beginning-position
|
||||
#key: line-beginning-position
|
||||
#key: lbp
|
||||
# --
|
||||
(line-beginning-position)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/line-end-position
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/line-end-position
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: line-end-position
|
||||
#key: line-end-position
|
||||
#key: lep
|
||||
# --
|
||||
(line-end-position)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/list
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/list
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: list
|
||||
#key: list
|
||||
# --
|
||||
(list $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/looking-at
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/looking-at
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: looking-at
|
||||
#key: looking-at
|
||||
#key: la
|
||||
# --
|
||||
(looking-at $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/make-directory
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/make-directory
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: make-directory
|
||||
#key: make-directory
|
||||
#key: md
|
||||
# --
|
||||
(make-directory ${1:directory}${2: parents})
|
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: make-local-variable
|
||||
#key: make-local-variable
|
||||
#key: mlv
|
||||
# --
|
||||
(make-local-variable $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/mapc
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/mapc
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: mapc
|
||||
#key: mapc
|
||||
# --
|
||||
(mapc ${1:function} $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/mapcar
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/mapcar
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: mapcar
|
||||
#key: mapcar
|
||||
# --
|
||||
(mapcar $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/match-beginning
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/match-beginning
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: match-beginning
|
||||
#key: match-beginning
|
||||
#key: mb
|
||||
# --
|
||||
(match-beginning $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/match-end
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/match-end
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: match-end
|
||||
#key: match-end
|
||||
#key: me
|
||||
# --
|
||||
(match-end $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/match-string
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/match-string
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: match-string
|
||||
#key: match-string
|
||||
#key: ms
|
||||
# --
|
||||
(match-string $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/memq
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/memq
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: memq
|
||||
#key: memq
|
||||
# --
|
||||
(memq ${1:element} ${2:list})
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/message
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/message
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: message
|
||||
#key: message
|
||||
#key: m
|
||||
# --
|
||||
(message "${1:message}"${2: format-args})
|
@@ -0,0 +1,20 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: minor_mode
|
||||
# key: minor
|
||||
# --
|
||||
(defvar ${1:mode}-modeline-indicator " ${2:indicator}"
|
||||
"call ($1-install-mode) again if this is changed")
|
||||
|
||||
(defvar $1-mode nil)
|
||||
(make-variable-buffer-local '$1-mode)
|
||||
(put '$1-mode 'permanent-local t)
|
||||
|
||||
(defun $1-mode (&optional arg)
|
||||
"$0"
|
||||
(interactive "P")
|
||||
(setq $1-mode
|
||||
(if (null arg) (not $1-mode)
|
||||
(> (prefix-numeric-value arg) 0)))
|
||||
(force-mode-line-update))
|
||||
|
||||
(provide '$1-mode)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/not
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/not
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: not
|
||||
#key: not
|
||||
#key: n
|
||||
# --
|
||||
(not $0)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/nth
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/nth
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: nth
|
||||
#key: nth
|
||||
# --
|
||||
(nth ${1:index} ${2:list})
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/null
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/null
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: null
|
||||
#key: null
|
||||
# --
|
||||
(null $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/number-to-string
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/number-to-string
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: number-to-string
|
||||
#key: number-to-string
|
||||
#key: nts
|
||||
# --
|
||||
(number-to-string $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/or
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/or
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: or
|
||||
#key: or
|
||||
#key: o
|
||||
# --
|
||||
(or $0)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/point
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/point
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: point
|
||||
#key: point
|
||||
#key: p
|
||||
# --
|
||||
(point)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/point-max
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/point-max
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: point-max
|
||||
#key: point-max
|
||||
# --
|
||||
(point-max)
|
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/point-min
Executable file
6
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/point-min
Executable file
@@ -0,0 +1,6 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: point-min
|
||||
#key: point-min
|
||||
#key: pm
|
||||
# --
|
||||
(point-min)
|
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/princ
Executable file
5
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/princ
Executable file
@@ -0,0 +1,5 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: princ
|
||||
#key: princ
|
||||
# --
|
||||
(princ $0)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user