mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Add explicit "# key" directive to legacy snippet collection before deprecating filenames-as-triggers
This commit is contained in:
parent
1bc5993a44
commit
f48317e7c5
@ -1,3 +1,4 @@
|
|||||||
#name : v.begin(), v.end()
|
#name : v.begin(), v.end()
|
||||||
|
# key: beginend
|
||||||
# --
|
# --
|
||||||
${1:v}.begin(), $1.end
|
${1:v}.begin(), $1.end
|
@ -1,4 +1,5 @@
|
|||||||
#name : class ... { ... }
|
#name : class ... { ... }
|
||||||
|
# key: class
|
||||||
# --
|
# --
|
||||||
class ${1:Name}
|
class ${1:Name}
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
#name : namespace ...
|
#name : namespace ...
|
||||||
|
# key: ns
|
||||||
# --
|
# --
|
||||||
namespace
|
namespace
|
@ -1,3 +1,4 @@
|
|||||||
#name : template <typename ...>
|
#name : template <typename ...>
|
||||||
|
# key: template
|
||||||
# --
|
# --
|
||||||
template <typename ${T}>
|
template <typename ${T}>
|
@ -1,4 +1,5 @@
|
|||||||
#name : using namespace ...
|
#name : using namespace ...
|
||||||
|
# key: using
|
||||||
# --
|
# --
|
||||||
using namespace ${std};
|
using namespace ${std};
|
||||||
$0
|
$0
|
@ -1,3 +1,4 @@
|
|||||||
#name : FILE *fp = fopen(..., ...);
|
#name : FILE *fp = fopen(..., ...);
|
||||||
|
# key: fopen
|
||||||
# --
|
# --
|
||||||
FILE *${fp} = fopen(${"file"}, "${r}");
|
FILE *${fp} = fopen(${"file"}, "${r}");
|
@ -1,6 +1,7 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name : printf
|
# name : printf
|
||||||
# contributor : joaotavora
|
# contributor : joaotavora
|
||||||
|
# key: printf
|
||||||
# --
|
# --
|
||||||
printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")
|
printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")
|
||||||
}$2${1:$(if (string-match "%" text) "\);" "")}
|
}$2${1:$(if (string-match "%" text) "\);" "")}
|
@ -1,4 +1,5 @@
|
|||||||
#name : do { ... } while (...)
|
#name : do { ... } while (...)
|
||||||
|
# key: do
|
||||||
# --
|
# --
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : for (...; ...; ...) { ... }
|
#name : for (...; ...; ...) { ... }
|
||||||
|
# key: for
|
||||||
# --
|
# --
|
||||||
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
|
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : if (...) { ... }
|
#name : if (...) { ... }
|
||||||
|
# key: cc-modeif
|
||||||
# --
|
# --
|
||||||
if (${1:condition})
|
if (${1:condition})
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
#name : #include "..."
|
#name : #include "..."
|
||||||
|
# key: inc
|
||||||
# --
|
# --
|
||||||
#include "$1"
|
#include "$1"
|
@ -1,3 +1,4 @@
|
|||||||
#name : #include <...>
|
#name : #include <...>
|
||||||
|
# key: inc
|
||||||
# --
|
# --
|
||||||
#include <$1>
|
#include <$1>
|
@ -1,4 +1,5 @@
|
|||||||
#name: int main(argc, argv) { ... }
|
#name: int main(argc, argv) { ... }
|
||||||
|
# key: main
|
||||||
# --
|
# --
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : #ifndef XXX; #define XXX; #endif
|
#name : #ifndef XXX; #define XXX; #endif
|
||||||
|
# key: once
|
||||||
# --
|
# --
|
||||||
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
|
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
|
||||||
#define $1
|
#define $1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : struct ... { ... }
|
#name : struct ... { ... }
|
||||||
|
# key: struct
|
||||||
# --
|
# --
|
||||||
struct ${1:name}
|
struct ${1:name}
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : private attribute ....;
|
#name : private attribute ....;
|
||||||
|
# key: attrib
|
||||||
# --
|
# --
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// $3
|
/// $3
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : private attribute ....; public property ... ... { ... }
|
#name : private attribute ....; public property ... ... { ... }
|
||||||
|
# key: attrib
|
||||||
# --
|
# --
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// $3
|
/// $3
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : private _attribute ....; public Property ... ... { ... }
|
#name : private _attribute ....; public Property ... ... { ... }
|
||||||
|
# key: attrib
|
||||||
# --
|
# --
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// $3
|
/// $3
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : class ... { ... }
|
#name : class ... { ... }
|
||||||
|
# key: class
|
||||||
# --
|
# --
|
||||||
${5:public} class ${1:Name}
|
${5:public} class ${1:Name}
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : /// <summary> ... </summary>
|
#name : /// <summary> ... </summary>
|
||||||
|
# key: comment
|
||||||
# --
|
# --
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// $1
|
/// $1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : /// <param name="..."> ... </param>
|
#name : /// <param name="..."> ... </param>
|
||||||
|
# key: comment
|
||||||
# --
|
# --
|
||||||
/// <param name="$1">$2</param>
|
/// <param name="$1">$2</param>
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : /// <param name="..."> ... </param>
|
#name : /// <param name="..."> ... </param>
|
||||||
|
# key: comment
|
||||||
# --
|
# --
|
||||||
/// <returns>$1</returns>
|
/// <returns>$1</returns>
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : /// <exception cref="..."> ... </exception>
|
#name : /// <exception cref="..."> ... </exception>
|
||||||
|
# key: comment
|
||||||
# --
|
# --
|
||||||
/// <exception cref="$1">$2</exception>
|
/// <exception cref="$1">$2</exception>
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : public void Method { ... }
|
#name : public void Method { ... }
|
||||||
|
# key: method
|
||||||
# --
|
# --
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ${5:Description}
|
/// ${5:Description}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : namespace .. { ... }
|
#name : namespace .. { ... }
|
||||||
|
# key: namespace
|
||||||
# --
|
# --
|
||||||
namespace $1
|
namespace $1
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : property ... ... { ... }
|
#name : property ... ... { ... }
|
||||||
|
# key: prop
|
||||||
# --
|
# --
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// $5
|
/// $5
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : #region ... #endregion
|
#name : #region ... #endregion
|
||||||
|
# key: region
|
||||||
# --
|
# --
|
||||||
#region $1
|
#region $1
|
||||||
$0
|
$0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : using ...;
|
#name : using ...;
|
||||||
|
# key: using
|
||||||
# --
|
# --
|
||||||
using $1;
|
using $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : using System;
|
#name : using System;
|
||||||
|
# key: using
|
||||||
# --
|
# --
|
||||||
using System;
|
using System;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
#name : using System....;
|
#name : using System....;
|
||||||
|
# key: using
|
||||||
# --
|
# --
|
||||||
using System.$1;
|
using System.$1;
|
@ -1,3 +1,4 @@
|
|||||||
#name : background-color: ...
|
#name : background-color: ...
|
||||||
|
# key: bg
|
||||||
# --
|
# --
|
||||||
background-color: #${1:DDD};
|
background-color: #${1:DDD};
|
@ -1,3 +1,4 @@
|
|||||||
#name : background-image: ...
|
#name : background-image: ...
|
||||||
|
# key: bg
|
||||||
# --
|
# --
|
||||||
background-image: url($1);
|
background-image: url($1);
|
@ -1,3 +1,4 @@
|
|||||||
#name : border size style color
|
#name : border size style color
|
||||||
|
# key: bor
|
||||||
# --
|
# --
|
||||||
border: ${1:1px} ${2:solid} #${3:999};
|
border: ${1:1px} ${2:solid} #${3:999};
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : clear: ...
|
#name : clear: ...
|
||||||
|
# key: cl
|
||||||
# --
|
# --
|
||||||
clear: $1;
|
clear: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : display: block
|
#name : display: block
|
||||||
|
# key: disp
|
||||||
# --
|
# --
|
||||||
display: block;
|
display: block;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : display: inline
|
#name : display: inline
|
||||||
|
# key: disp
|
||||||
# --
|
# --
|
||||||
display: inline;
|
display: inline;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : display: none
|
#name : display: none
|
||||||
|
# key: disp
|
||||||
# --
|
# --
|
||||||
display: none;
|
display: none;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : font-family: ...
|
#name : font-family: ...
|
||||||
|
# key: ff
|
||||||
# --
|
# --
|
||||||
font-family: $1;
|
font-family: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : font-size: ...
|
#name : font-size: ...
|
||||||
|
# key: fs
|
||||||
# --
|
# --
|
||||||
font-size: ${12px};
|
font-size: ${12px};
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : margin-bottom: ...
|
#name : margin-bottom: ...
|
||||||
|
# key: mar
|
||||||
# --
|
# --
|
||||||
margin-bottom: $1;
|
margin-bottom: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : margin-left: ...
|
#name : margin-left: ...
|
||||||
|
# key: mar
|
||||||
# --
|
# --
|
||||||
margin-left: $1;
|
margin-left: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : margin: ...
|
#name : margin: ...
|
||||||
|
# key: mar
|
||||||
# --
|
# --
|
||||||
margin: $1;
|
margin: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : margin top right bottom left
|
#name : margin top right bottom left
|
||||||
|
# key: mar
|
||||||
# --
|
# --
|
||||||
margin: ${top} ${right} ${bottom} ${left};
|
margin: ${top} ${right} ${bottom} ${left};
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : margin-right: ...
|
#name : margin-right: ...
|
||||||
|
# key: mar
|
||||||
# --
|
# --
|
||||||
margin-right: $1;
|
margin-right: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : margin-top: ...
|
#name : margin-top: ...
|
||||||
|
# key: mar
|
||||||
# --
|
# --
|
||||||
margin-top: $1;
|
margin-top: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : padding-bottom: ...
|
#name : padding-bottom: ...
|
||||||
|
# key: pad
|
||||||
# --
|
# --
|
||||||
padding-bottom: $1;
|
padding-bottom: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : padding-left: ...
|
#name : padding-left: ...
|
||||||
|
# key: pad
|
||||||
# --
|
# --
|
||||||
padding-left: $1;
|
padding-left: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : padding: ...
|
#name : padding: ...
|
||||||
|
# key: pad
|
||||||
# --
|
# --
|
||||||
padding: $1;
|
padding: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : padding: top right bottom left
|
#name : padding: top right bottom left
|
||||||
|
# key: pad
|
||||||
# --
|
# --
|
||||||
padding: ${top} ${right} ${bottom} ${left};
|
padding: ${top} ${right} ${bottom} ${left};
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : padding-right: ...
|
#name : padding-right: ...
|
||||||
|
# key: pad
|
||||||
# --
|
# --
|
||||||
padding-right: $1;
|
padding-right: $1;
|
@ -1,4 +1,5 @@
|
|||||||
#contributor : rejeep <johan.rejeep@gmail.com>
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
#name : padding-top: ...
|
#name : padding-top: ...
|
||||||
|
# key: pad
|
||||||
# --
|
# --
|
||||||
padding-top: $1;
|
padding-top: $1;
|
@ -1,5 +1,6 @@
|
|||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
#name: process marked files in dired
|
#name: process marked files in dired
|
||||||
|
# key: x-dired
|
||||||
# --
|
# --
|
||||||
;; idiom for processing a list of files in dired's marked files
|
;; idiom for processing a list of files in dired's marked files
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
#name: a function that process a file
|
#name: a function that process a file
|
||||||
|
# key: x-file
|
||||||
# --
|
# --
|
||||||
(defun doThisFile (fpath)
|
(defun doThisFile (fpath)
|
||||||
"Process the file at path FPATH ..."
|
"Process the file at path FPATH ..."
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
#name: read lines of a file
|
#name: read lines of a file
|
||||||
|
# key: x-file
|
||||||
# --
|
# --
|
||||||
(defun read-lines (filePath)
|
(defun read-lines (filePath)
|
||||||
"Return a list of lines in FILEPATH."
|
"Return a list of lines in FILEPATH."
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
#name: find and replace on region
|
#name: find and replace on region
|
||||||
|
# key: x-find-replace
|
||||||
# --
|
# --
|
||||||
(defun replace-html-chars-region (start end)
|
(defun replace-html-chars-region (start end)
|
||||||
"Replace “<” to “<” and other chars in HTML.
|
"Replace “<” to “<” and other chars in HTML.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
#name: grab buffer substring
|
#name: grab buffer substring
|
||||||
|
# key: x-grabstring
|
||||||
# --
|
# --
|
||||||
(setq $0 (buffer-substring-no-properties myStartPos myEndPos))
|
(setq $0 (buffer-substring-no-properties myStartPos myEndPos))
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
#name: grab word under cursor
|
#name: grab word under cursor
|
||||||
|
# key: x-grabthing
|
||||||
# --
|
# --
|
||||||
(setq $0 (thing-at-point 'symbol))
|
(setq $0 (thing-at-point 'symbol))
|
@ -1,5 +1,6 @@
|
|||||||
#name: traversing a directory
|
#name: traversing a directory
|
||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
|
# key: x-traverse_dir
|
||||||
# --
|
# --
|
||||||
;; apply a function to all files in a dir
|
;; apply a function to all files in a dir
|
||||||
(require 'find-lisp)
|
(require 'find-lisp)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#contributor: Xah Lee (XahLee.org)
|
#contributor: Xah Lee (XahLee.org)
|
||||||
#name: Command that works on region or word
|
#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
|
;; example of a command that works on current word or text selection
|
||||||
(defun down-case-word-or-region ()
|
(defun down-case-word-or-region ()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : after ... ->
|
#name : after ... ->
|
||||||
|
# key: after
|
||||||
# --
|
# --
|
||||||
after
|
after
|
||||||
$1 -> $0
|
$1 -> $0
|
@ -1,4 +1,5 @@
|
|||||||
#name : begin ... end
|
#name : begin ... end
|
||||||
|
# key: begin
|
||||||
# --
|
# --
|
||||||
begin
|
begin
|
||||||
$0
|
$0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : -behaviour(...).
|
#name : -behaviour(...).
|
||||||
|
# key: beh
|
||||||
# --
|
# --
|
||||||
-behaviour(${1:gen_server}).
|
-behaviour(${1:gen_server}).
|
||||||
$0
|
$0
|
@ -1,4 +1,5 @@
|
|||||||
#name : case ... of ... end
|
#name : case ... of ... end
|
||||||
|
# key: case
|
||||||
# --
|
# --
|
||||||
case $1 of
|
case $1 of
|
||||||
$0
|
$0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : -compile(...).
|
#name : -compile(...).
|
||||||
|
# key: compile
|
||||||
# --
|
# --
|
||||||
-compile([${1:export_all}]).
|
-compile([${1:export_all}]).
|
||||||
$0
|
$0
|
@ -1,4 +1,5 @@
|
|||||||
#name : -define(...,...).
|
#name : -define(...,...).
|
||||||
|
# key: def
|
||||||
# --
|
# --
|
||||||
-define($1,$2).
|
-define($1,$2).
|
||||||
$0
|
$0
|
@ -1,5 +1,6 @@
|
|||||||
#name : -export([]).
|
#name : -export([]).
|
||||||
#contributor : hitesh <hitesh.jasani@gmail.com>
|
#contributor : hitesh <hitesh.jasani@gmail.com>
|
||||||
|
# key: exp
|
||||||
# --
|
# --
|
||||||
-export([${1:start/0}]).
|
-export([${1:start/0}]).
|
||||||
$0
|
$0
|
@ -1,3 +1,4 @@
|
|||||||
#name : fun (...) -> ... end
|
#name : fun (...) -> ... end
|
||||||
|
# key: fun
|
||||||
# --
|
# --
|
||||||
fun ($1) -> $0 end
|
fun ($1) -> $0 end
|
@ -1,4 +1,5 @@
|
|||||||
#name : if ... -> ... ; true -> ... end
|
#name : if ... -> ... ; true -> ... end
|
||||||
|
# key: erlang-modeif
|
||||||
# --
|
# --
|
||||||
if
|
if
|
||||||
$1 -> $2;
|
$1 -> $2;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : -ifdef(...). ... -endif.
|
#name : -ifdef(...). ... -endif.
|
||||||
|
# key: erlang-modeifdef
|
||||||
# --
|
# --
|
||||||
-ifdef($1).
|
-ifdef($1).
|
||||||
$0
|
$0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : -ifndef(...). ... -endif.
|
#name : -ifndef(...). ... -endif.
|
||||||
|
# key: erlang-modeifndef
|
||||||
# --
|
# --
|
||||||
-ifndef($1).
|
-ifndef($1).
|
||||||
$0
|
$0
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#name : -import([]).
|
#name : -import([]).
|
||||||
#contributor : hitesh <hitesh.jasani@gmail.com>
|
#contributor : hitesh <hitesh.jasani@gmail.com>
|
||||||
|
# key: imp
|
||||||
# --
|
# --
|
||||||
-import(${1:lists}, [${2:map/2, sum/1}]).
|
-import(${1:lists}, [${2:map/2, sum/1}]).
|
||||||
$0
|
$0
|
@ -1,4 +1,5 @@
|
|||||||
#name : -include("...").
|
#name : -include("...").
|
||||||
|
# key: inc
|
||||||
# --
|
# --
|
||||||
-include("$1").
|
-include("$1").
|
||||||
$0
|
$0
|
@ -1,4 +1,5 @@
|
|||||||
#name : -include_lib("...").
|
#name : -include_lib("...").
|
||||||
|
# key: inc
|
||||||
# --
|
# --
|
||||||
-include_lib("$1").
|
-include_lib("$1").
|
||||||
$0
|
$0
|
@ -1,4 +1,5 @@
|
|||||||
#name : loop(...) -> receive _ -> loop(...) end.
|
#name : loop(...) -> receive _ -> loop(...) end.
|
||||||
|
# key: loop
|
||||||
# --
|
# --
|
||||||
${1:loop}($2) ->
|
${1:loop}($2) ->
|
||||||
receive
|
receive
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#name : -module().
|
#name : -module().
|
||||||
#contributor : hitesh <hitesh.jasani@gmail.com>
|
#contributor : hitesh <hitesh.jasani@gmail.com>
|
||||||
|
# key: mod
|
||||||
# --
|
# --
|
||||||
-module(${1:`(file-name-nondirectory
|
-module(${1:`(file-name-nondirectory
|
||||||
(file-name-sans-extension (or (buffer-file-name) (buffer-name))))`}).
|
(file-name-sans-extension (or (buffer-file-name) (buffer-name))))`}).
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : receive ... -> ... end
|
#name : receive ... -> ... end
|
||||||
|
# key: rcv
|
||||||
# --
|
# --
|
||||||
receive
|
receive
|
||||||
$1 -> $0
|
$1 -> $0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : receive after ... -> ... end
|
#name : receive after ... -> ... end
|
||||||
|
# key: rcv
|
||||||
# --
|
# --
|
||||||
receive
|
receive
|
||||||
after
|
after
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : -record(...,{...}).
|
#name : -record(...,{...}).
|
||||||
|
# key: rec
|
||||||
# --
|
# --
|
||||||
-record($1,{$2}).
|
-record($1,{$2}).
|
||||||
$0
|
$0
|
@ -1,4 +1,5 @@
|
|||||||
#name : try ... of ... catch after end
|
#name : try ... of ... catch after end
|
||||||
|
# key: try
|
||||||
# --
|
# --
|
||||||
try $1 of
|
try $1 of
|
||||||
$0
|
$0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#name : -undef(...).
|
#name : -undef(...).
|
||||||
|
# key: undef
|
||||||
# --
|
# --
|
||||||
-undef($1).
|
-undef($1).
|
||||||
$0
|
$0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : automatic
|
#name : automatic
|
||||||
|
# key: au
|
||||||
# --
|
# --
|
||||||
automatic $0
|
automatic $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : block data
|
#name : block data
|
||||||
|
# key: bd
|
||||||
# --
|
# --
|
||||||
block data $0
|
block data $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : continue
|
#name : continue
|
||||||
|
# key: c
|
||||||
# --
|
# --
|
||||||
continue $0
|
continue $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : character
|
#name : character
|
||||||
|
# key: ch
|
||||||
# --
|
# --
|
||||||
character $0
|
character $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : complex
|
#name : complex
|
||||||
|
# key: cx
|
||||||
# --
|
# --
|
||||||
complex $0
|
complex $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : double complex
|
#name : double complex
|
||||||
|
# key: dc
|
||||||
# --
|
# --
|
||||||
double complex $0
|
double complex $0
|
@ -1,5 +1,6 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : do while (...) end do
|
#name : do while (...) end do
|
||||||
|
# key: do
|
||||||
# --
|
# --
|
||||||
do while (${1:condition})
|
do while (${1:condition})
|
||||||
$0
|
$0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : double precision
|
#name : double precision
|
||||||
|
# key: dp
|
||||||
# --
|
# --
|
||||||
double precision $0
|
double precision $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : equivalence
|
#name : equivalence
|
||||||
|
# key: eq
|
||||||
# --
|
# --
|
||||||
equivalence $0
|
equivalence $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : implicit byte
|
#name : implicit byte
|
||||||
|
# key: ib
|
||||||
# --
|
# --
|
||||||
implicit byte $0
|
implicit byte $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : implicit complex
|
#name : implicit complex
|
||||||
|
# key: ic
|
||||||
# --
|
# --
|
||||||
implicit complex $0
|
implicit complex $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : implicit character
|
#name : implicit character
|
||||||
|
# key: ich
|
||||||
# --
|
# --
|
||||||
implicit character $0
|
implicit character $0
|
@ -1,5 +1,6 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : if then end if
|
#name : if then end if
|
||||||
|
# key: f90-modeif
|
||||||
# --
|
# --
|
||||||
if ( ${1:condition} ) then
|
if ( ${1:condition} ) then
|
||||||
$0
|
$0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : implicit integer
|
#name : implicit integer
|
||||||
|
# key: ii
|
||||||
# --
|
# --
|
||||||
implicit integer $0
|
implicit integer $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : implicit logical
|
#name : implicit logical
|
||||||
|
# key: il
|
||||||
# --
|
# --
|
||||||
implicit logical $0
|
implicit logical $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : implicit none
|
#name : implicit none
|
||||||
|
# key: in
|
||||||
# --
|
# --
|
||||||
implicit none
|
implicit none
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : include
|
#name : include
|
||||||
|
# key: inc
|
||||||
# --
|
# --
|
||||||
include $0
|
include $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : intrinsic
|
#name : intrinsic
|
||||||
|
# key: intr
|
||||||
# --
|
# --
|
||||||
intrinsic $0
|
intrinsic $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : implicit real
|
#name : implicit real
|
||||||
|
# key: ir
|
||||||
# --
|
# --
|
||||||
implicit real $0
|
implicit real $0
|
@ -1,4 +1,5 @@
|
|||||||
#contributor: Li Zhu <http://www.zhuli.name>
|
#contributor: Li Zhu <http://www.zhuli.name>
|
||||||
#name : logical
|
#name : logical
|
||||||
|
# key: l
|
||||||
# --
|
# --
|
||||||
logical $0
|
logical $0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user