Add explicit "# key" directive to legacy snippet collection before deprecating filenames-as-triggers

This commit is contained in:
Joao Tavora 2011-10-31 12:32:34 +00:00
parent 1bc5993a44
commit f48317e7c5
402 changed files with 403 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#name : v.begin(), v.end()
# key: beginend
# --
${1:v}.begin(), $1.end

View File

@ -1,4 +1,5 @@
#name : class ... { ... }
# key: class
# --
class ${1:Name}
{

View File

@ -1,3 +1,4 @@
#name : namespace ...
# key: ns
# --
namespace

View File

@ -1,3 +1,4 @@
#name : template <typename ...>
# key: template
# --
template <typename ${T}>

View File

@ -1,4 +1,5 @@
#name : using namespace ...
# key: using
# --
using namespace ${std};
$0

View File

@ -1,3 +1,4 @@
#name : FILE *fp = fopen(..., ...);
# key: fopen
# --
FILE *${fp} = fopen(${"file"}, "${r}");

View File

@ -1,6 +1,7 @@
# -*- mode: snippet -*-
# name : printf
# contributor : joaotavora
# key: printf
# --
printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")
}$2${1:$(if (string-match "%" text) "\);" "")}

View File

@ -1,4 +1,5 @@
#name : do { ... } while (...)
# key: do
# --
do
{

View File

@ -1,4 +1,5 @@
#name : for (...; ...; ...) { ... }
# key: for
# --
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
{

View File

@ -1,4 +1,5 @@
#name : if (...) { ... }
# key: cc-modeif
# --
if (${1:condition})
{

View File

@ -1,3 +1,4 @@
#name : #include "..."
# key: inc
# --
#include "$1"

View File

@ -1,3 +1,4 @@
#name : #include <...>
# key: inc
# --
#include <$1>

View File

@ -1,4 +1,5 @@
#name: int main(argc, argv) { ... }
# key: main
# --
int main(int argc, char *argv[])
{

View File

@ -1,4 +1,5 @@
#name : #ifndef XXX; #define XXX; #endif
# key: once
# --
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
#define $1

View File

@ -1,4 +1,5 @@
#name : struct ... { ... }
# key: struct
# --
struct ${1:name}
{

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....;
# key: attrib
# --
/// <summary>
/// $3

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....; public property ... ... { ... }
# key: attrib
# --
/// <summary>
/// $3

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private _attribute ....; public Property ... ... { ... }
# key: attrib
# --
/// <summary>
/// $3

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : class ... { ... }
# key: class
# --
${5:public} class ${1:Name}
{

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <summary> ... </summary>
# key: comment
# --
/// <summary>
/// $1

View File

@ -1,4 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# key: comment
# --
/// <param name="$1">$2</param>

View File

@ -1,4 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# key: comment
# --
/// <returns>$1</returns>

View File

@ -1,4 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <exception cref="..."> ... </exception>
# key: comment
# --
/// <exception cref="$1">$2</exception>

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : public void Method { ... }
# key: method
# --
/// <summary>
/// ${5:Description}

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : namespace .. { ... }
# key: namespace
# --
namespace $1
{

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : property ... ... { ... }
# key: prop
# --
/// <summary>
/// $5

View File

@ -1,5 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : #region ... #endregion
# key: region
# --
#region $1
$0

View File

@ -1,4 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using ...;
# key: using
# --
using $1;

View File

@ -1,4 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System;
# key: using
# --
using System;

View File

@ -1,4 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System....;
# key: using
# --
using System.$1;

View File

@ -1,3 +1,4 @@
#name : background-color: ...
# key: bg
# --
background-color: #${1:DDD};

View File

@ -1,3 +1,4 @@
#name : background-image: ...
# key: bg
# --
background-image: url($1);

View File

@ -1,3 +1,4 @@
#name : border size style color
# key: bor
# --
border: ${1:1px} ${2:solid} #${3:999};

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : clear: ...
# key: cl
# --
clear: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: block
# key: disp
# --
display: block;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: inline
# key: disp
# --
display: inline;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: none
# key: disp
# --
display: none;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-family: ...
# key: ff
# --
font-family: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-size: ...
# key: fs
# --
font-size: ${12px};

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-bottom: ...
# key: mar
# --
margin-bottom: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-left: ...
# key: mar
# --
margin-left: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin: ...
# key: mar
# --
margin: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin top right bottom left
# key: mar
# --
margin: ${top} ${right} ${bottom} ${left};

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-right: ...
# key: mar
# --
margin-right: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-top: ...
# key: mar
# --
margin-top: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-bottom: ...
# key: pad
# --
padding-bottom: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-left: ...
# key: pad
# --
padding-left: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding: ...
# key: pad
# --
padding: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding: top right bottom left
# key: pad
# --
padding: ${top} ${right} ${bottom} ${left};

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-right: ...
# key: pad
# --
padding-right: $1;

View File

@ -1,4 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-top: ...
# key: pad
# --
padding-top: $1;

View File

@ -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

View File

@ -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 ..."

View File

@ -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."

View File

@ -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 “&lt;” and other chars in HTML.

View File

@ -1,4 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: grab buffer substring
# key: x-grabstring
# --
(setq $0 (buffer-substring-no-properties myStartPos myEndPos))

View File

@ -1,4 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: grab word under cursor
# key: x-grabthing
# --
(setq $0 (thing-at-point 'symbol))

View File

@ -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)

View File

@ -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 ()

View File

@ -1,4 +1,5 @@
#name : after ... ->
# key: after
# --
after
$1 -> $0

View File

@ -1,4 +1,5 @@
#name : begin ... end
# key: begin
# --
begin
$0

View File

@ -1,4 +1,5 @@
#name : -behaviour(...).
# key: beh
# --
-behaviour(${1:gen_server}).
$0

View File

@ -1,4 +1,5 @@
#name : case ... of ... end
# key: case
# --
case $1 of
$0

View File

@ -1,4 +1,5 @@
#name : -compile(...).
# key: compile
# --
-compile([${1:export_all}]).
$0

View File

@ -1,4 +1,5 @@
#name : -define(...,...).
# key: def
# --
-define($1,$2).
$0

View File

@ -1,5 +1,6 @@
#name : -export([]).
#contributor : hitesh <hitesh.jasani@gmail.com>
# key: exp
# --
-export([${1:start/0}]).
$0

View File

@ -1,3 +1,4 @@
#name : fun (...) -> ... end
# key: fun
# --
fun ($1) -> $0 end

View File

@ -1,4 +1,5 @@
#name : if ... -> ... ; true -> ... end
# key: erlang-modeif
# --
if
$1 -> $2;

View File

@ -1,4 +1,5 @@
#name : -ifdef(...). ... -endif.
# key: erlang-modeifdef
# --
-ifdef($1).
$0

View File

@ -1,4 +1,5 @@
#name : -ifndef(...). ... -endif.
# key: erlang-modeifndef
# --
-ifndef($1).
$0

View File

@ -1,5 +1,6 @@
#name : -import([]).
#contributor : hitesh <hitesh.jasani@gmail.com>
# key: imp
# --
-import(${1:lists}, [${2:map/2, sum/1}]).
$0

View File

@ -1,4 +1,5 @@
#name : -include("...").
# key: inc
# --
-include("$1").
$0

View File

@ -1,4 +1,5 @@
#name : -include_lib("...").
# key: inc
# --
-include_lib("$1").
$0

View File

@ -1,4 +1,5 @@
#name : loop(...) -> receive _ -> loop(...) end.
# key: loop
# --
${1:loop}($2) ->
receive

View File

@ -1,5 +1,6 @@
#name : -module().
#contributor : hitesh <hitesh.jasani@gmail.com>
# key: mod
# --
-module(${1:`(file-name-nondirectory
(file-name-sans-extension (or (buffer-file-name) (buffer-name))))`}).

View File

@ -1,4 +1,5 @@
#name : receive ... -> ... end
# key: rcv
# --
receive
$1 -> $0

View File

@ -1,4 +1,5 @@
#name : receive after ... -> ... end
# key: rcv
# --
receive
after

View File

@ -1,4 +1,5 @@
#name : -record(...,{...}).
# key: rec
# --
-record($1,{$2}).
$0

View File

@ -1,4 +1,5 @@
#name : try ... of ... catch after end
# key: try
# --
try $1 of
$0

View File

@ -1,4 +1,5 @@
#name : -undef(...).
# key: undef
# --
-undef($1).
$0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : automatic
# key: au
# --
automatic $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : block data
# key: bd
# --
block data $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : continue
# key: c
# --
continue $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : character
# key: ch
# --
character $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : complex
# key: cx
# --
complex $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : double complex
# key: dc
# --
double complex $0

View File

@ -1,5 +1,6 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : do while (...) end do
# key: do
# --
do while (${1:condition})
$0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : double precision
# key: dp
# --
double precision $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : equivalence
# key: eq
# --
equivalence $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : implicit byte
# key: ib
# --
implicit byte $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : implicit complex
# key: ic
# --
implicit complex $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : implicit character
# key: ich
# --
implicit character $0

View File

@ -1,5 +1,6 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : if then end if
# key: f90-modeif
# --
if ( ${1:condition} ) then
$0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : implicit integer
# key: ii
# --
implicit integer $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : implicit logical
# key: il
# --
implicit logical $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : implicit none
# key: in
# --
implicit none

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : include
# key: inc
# --
include $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : intrinsic
# key: intr
# --
intrinsic $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : implicit real
# key: ir
# --
implicit real $0

View File

@ -1,4 +1,5 @@
#contributor: Li Zhu <http://www.zhuli.name>
#name : logical
# key: l
# --
logical $0

Some files were not shown because too many files have changed in this diff Show More