Skip to content

Commit

Permalink
Keep snippet vars definitions in a single format across all snippets …
Browse files Browse the repository at this point in the history
…and documentation.

The format is:

# var-name: value

Previously snippets used a mixture of the following formatting:

#var-name: value
#var-name : value
# var-name: value
# var-name : value
  • Loading branch information
jimeh committed Nov 3, 2011
1 parent acf84b2 commit 09cc3ee
Show file tree
Hide file tree
Showing 533 changed files with 1,180 additions and 1,180 deletions.
4 changes: 2 additions & 2 deletions doc/faq.rst
Expand Up @@ -142,8 +142,8 @@ valid filename, ``lt.yasnippet`` for example, using ``<`` for the

.. sourcecode:: text

#key: <
#name: <...></...>
# key: <
# name: <...></...>
# --
<${1:div}>$0</$1>

Expand Down
10 changes: 5 additions & 5 deletions doc/snippet-development.rst
Expand Up @@ -81,8 +81,8 @@ Here's a typical example:

.. sourcecode:: text

#contributor : pluskid <pluskid@gmail.com>
#name : __...__
# contributor: pluskid <pluskid@gmail.com>
# name: __...__
# --
__${init}__

Expand Down Expand Up @@ -151,7 +151,7 @@ your hard work. You can then use:

.. sourcecode:: text

# name : ASCII home
# name: ASCII home
# expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
# --
welcome to my
Expand Down Expand Up @@ -180,8 +180,8 @@ snippet.

.. sourcecode:: text

#name : <p>...</p>
#binding: C-c C-c C-m
# name: <p>...</p>
# binding: C-c C-c C-m
# --
<p>`(when yas/prefix "\n")`$0`(when yas/prefix "\n")`</p>

Expand Down
2 changes: 1 addition & 1 deletion snippets/c++-mode/beginend
@@ -1,4 +1,4 @@
#name : v.begin(), v.end()
# name: v.begin(), v.end()
# key: beginend
# --
${1:v}.begin(), $1.end
2 changes: 1 addition & 1 deletion snippets/c++-mode/class
@@ -1,4 +1,4 @@
#name : class ... { ... }
# name: class ... { ... }
# key: class
# --
class ${1:Name}
Expand Down
2 changes: 1 addition & 1 deletion snippets/c++-mode/ns
@@ -1,4 +1,4 @@
#name : namespace ...
# name: namespace ...
# key: ns
# --
namespace
2 changes: 1 addition & 1 deletion snippets/c++-mode/template
@@ -1,4 +1,4 @@
#name : template <typename ...>
# name: template <typename ...>
# key: template
# --
template <typename ${T}>
2 changes: 1 addition & 1 deletion snippets/c++-mode/using
@@ -1,4 +1,4 @@
#name : using namespace ...
# name: using namespace ...
# key: using
# --
using namespace ${std};
Expand Down
2 changes: 1 addition & 1 deletion snippets/c-mode/fopen
@@ -1,4 +1,4 @@
#name : FILE *fp = fopen(..., ...);
# name: FILE *fp = fopen(..., ...);
# key: fopen
# --
FILE *${fp} = fopen(${"file"}, "${r}");
4 changes: 2 additions & 2 deletions snippets/c-mode/printf
@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
# name : printf
# contributor : joaotavora
# name: printf
# contributor: joaotavora
# key: printf
# --
printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")
Expand Down
2 changes: 1 addition & 1 deletion snippets/cc-mode/do
@@ -1,4 +1,4 @@
#name : do { ... } while (...)
# name: do { ... } while (...)
# key: do
# --
do
Expand Down
2 changes: 1 addition & 1 deletion snippets/cc-mode/for
@@ -1,4 +1,4 @@
#name : for (...; ...; ...) { ... }
# name: for (...; ...; ...) { ... }
# key: for
# --
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
Expand Down
2 changes: 1 addition & 1 deletion snippets/cc-mode/if
@@ -1,4 +1,4 @@
#name : if (...) { ... }
# name: if (...) { ... }
# key: cc-modeif
# --
if (${1:condition})
Expand Down
2 changes: 1 addition & 1 deletion snippets/cc-mode/inc
@@ -1,4 +1,4 @@
#name : #include "..."
# name: #include "..."
# key: inc
# --
#include "$1"
2 changes: 1 addition & 1 deletion snippets/cc-mode/inc.1
@@ -1,4 +1,4 @@
#name : #include <...>
# name: #include <...>
# key: inc
# --
#include <$1>
2 changes: 1 addition & 1 deletion snippets/cc-mode/main
@@ -1,4 +1,4 @@
#name: int main(argc, argv) { ... }
# name: int main(argc, argv) { ... }
# key: main
# --
int main(int argc, char *argv[])
Expand Down
2 changes: 1 addition & 1 deletion snippets/cc-mode/once
@@ -1,4 +1,4 @@
#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_}
Expand Down
2 changes: 1 addition & 1 deletion snippets/cc-mode/struct
@@ -1,4 +1,4 @@
#name : struct ... { ... }
# name: struct ... { ... }
# key: struct
# --
struct ${1:name}
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/attrib
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....;
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private attribute ....;
# key: attrib
# --
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/attrib.1
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....; public property ... ... { ... }
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private attribute ....; public property ... ... { ... }
# key: attrib
# --
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/attrib.2
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private _attribute ....; public Property ... ... { ... }
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private _attribute ....; public Property ... ... { ... }
# key: attrib
# --
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/class
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : class ... { ... }
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: class ... { ... }
# key: class
# --
${5:public} class ${1:Name}
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/comment
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <summary> ... </summary>
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <summary> ... </summary>
# key: comment
# --
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/comment.1
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <param name="..."> ... </param>
# key: comment
# --
/// <param name="$1">$2</param>
4 changes: 2 additions & 2 deletions snippets/csharp-mode/comment.2
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <param name="..."> ... </param>
# key: comment
# --
/// <returns>$1</returns>
4 changes: 2 additions & 2 deletions snippets/csharp-mode/comment.3
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <exception cref="..."> ... </exception>
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <exception cref="..."> ... </exception>
# key: comment
# --
/// <exception cref="$1">$2</exception>
4 changes: 2 additions & 2 deletions snippets/csharp-mode/method
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : public void Method { ... }
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: public void Method { ... }
# key: method
# --
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/namespace
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : namespace .. { ... }
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: namespace .. { ... }
# key: namespace
# --
namespace $1
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/prop
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : property ... ... { ... }
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: property ... ... { ... }
# key: prop
# --
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/region
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : #region ... #endregion
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: #region ... #endregion
# key: region
# --
#region $1
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp-mode/using
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using ...;
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using ...;
# key: using
# --
using $1;
4 changes: 2 additions & 2 deletions snippets/csharp-mode/using.1
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System;
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using System;
# key: using
# --
using System;
4 changes: 2 additions & 2 deletions snippets/csharp-mode/using.2
@@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System....;
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using System....;
# key: using
# --
using System.$1;
2 changes: 1 addition & 1 deletion snippets/css-mode/bg
@@ -1,4 +1,4 @@
#name : background-color: ...
# name: background-color: ...
# key: bg
# --
background-color: #${1:DDD};
2 changes: 1 addition & 1 deletion snippets/css-mode/bg.1
@@ -1,4 +1,4 @@
#name : background-image: ...
# name: background-image: ...
# key: bg
# --
background-image: url($1);
2 changes: 1 addition & 1 deletion snippets/css-mode/bor
@@ -1,4 +1,4 @@
#name : border size style color
# name: border size style color
# key: bor
# --
border: ${1:1px} ${2:solid} #${3:999};
4 changes: 2 additions & 2 deletions snippets/css-mode/cl
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : clear: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: clear: ...
# key: cl
# --
clear: $1;
4 changes: 2 additions & 2 deletions snippets/css-mode/disp.block
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: block
# contributor: rejeep <johan.rejeep@gmail.com>
# name: display: block
# key: disp
# --
display: block;
4 changes: 2 additions & 2 deletions snippets/css-mode/disp.inline
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: inline
# contributor: rejeep <johan.rejeep@gmail.com>
# name: display: inline
# key: disp
# --
display: inline;
4 changes: 2 additions & 2 deletions snippets/css-mode/disp.none
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: none
# contributor: rejeep <johan.rejeep@gmail.com>
# name: display: none
# key: disp
# --
display: none;
4 changes: 2 additions & 2 deletions snippets/css-mode/ff
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-family: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: font-family: ...
# key: ff
# --
font-family: $1;
4 changes: 2 additions & 2 deletions snippets/css-mode/fs
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-size: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: font-size: ...
# key: fs
# --
font-size: ${12px};
4 changes: 2 additions & 2 deletions snippets/css-mode/mar.bottom
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-bottom: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: margin-bottom: ...
# key: mar
# --
margin-bottom: $1;
4 changes: 2 additions & 2 deletions snippets/css-mode/mar.left
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-left: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: margin-left: ...
# key: mar
# --
margin-left: $1;
4 changes: 2 additions & 2 deletions snippets/css-mode/mar.mar
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: margin: ...
# key: mar
# --
margin: $1;
4 changes: 2 additions & 2 deletions snippets/css-mode/mar.margin
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin top right bottom left
# contributor: rejeep <johan.rejeep@gmail.com>
# name: margin top right bottom left
# key: mar
# --
margin: ${top} ${right} ${bottom} ${left};
4 changes: 2 additions & 2 deletions snippets/css-mode/mar.right
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-right: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: margin-right: ...
# key: mar
# --
margin-right: $1;
4 changes: 2 additions & 2 deletions snippets/css-mode/mar.top
@@ -1,5 +1,5 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-top: ...
# contributor: rejeep <johan.rejeep@gmail.com>
# name: margin-top: ...
# key: mar
# --
margin-top: $1;

0 comments on commit 09cc3ee

Please sign in to comment.