Skip to content

Commit

Permalink
now tracking the latest version of yasnippets also added org-mode sni…
Browse files Browse the repository at this point in the history
…ppets
  • Loading branch information
eschulte committed Sep 20, 2009
1 parent d6948ee commit 2426813
Show file tree
Hide file tree
Showing 410 changed files with 2,395 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -4,3 +4,6 @@
[submodule "src/magit"]
path = src/magit
url = git://gitorious.org/magit/mainline.git
[submodule "snippets/text-mode/org-mode"]
path = snippets/text-mode/org-mode
url = git://github.com/RickMoynihan/yasnippet-org-mode.git
3 changes: 3 additions & 0 deletions snippets/text-mode/cc-mode/c++-mode/beginend
@@ -0,0 +1,3 @@
#name : v.begin(), v.end()
# --
${1:v}.begin(), $1.end
8 changes: 8 additions & 0 deletions snippets/text-mode/cc-mode/c++-mode/class
@@ -0,0 +1,8 @@
#name : class ... { ... }
# --
class ${1:Name}
{
public:
${1:$(yas/substr text "[^: ]*")}($2);
virtual ~${1:$(yas/substr text "[^: ]*")}();
};
3 changes: 3 additions & 0 deletions snippets/text-mode/cc-mode/c++-mode/ns
@@ -0,0 +1,3 @@
#name : namespace ...
# --
namespace
3 changes: 3 additions & 0 deletions snippets/text-mode/cc-mode/c++-mode/template
@@ -0,0 +1,3 @@
#name : template <typename ...>
# --
template <typename ${T}>
4 changes: 4 additions & 0 deletions snippets/text-mode/cc-mode/c++-mode/using
@@ -0,0 +1,4 @@
#name : using namespace ...
# --
using namespace ${std};
$0
3 changes: 3 additions & 0 deletions snippets/text-mode/cc-mode/c-mode/fopen
@@ -0,0 +1,3 @@
#name : FILE *fp = fopen(..., ...);
# --
FILE *${fp} = fopen(${"file"}, "${r}");
6 changes: 6 additions & 0 deletions snippets/text-mode/cc-mode/c-mode/printf
@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name : printf
# contributor : joaotavora
# --
printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")
}$2${1:$(if (string-match "%" text) "\);" "")}
7 changes: 7 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/attrib
@@ -0,0 +1,7 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....;
# --
/// <summary>
/// $3
/// </summary>
private $1 $2;
21 changes: 21 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/attrib.1
@@ -0,0 +1,21 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....; public property ... ... { ... }
# --
/// <summary>
/// $3
/// </summary>
private $1 $2;

/// <summary>
/// $4
/// </summary>
/// <value>$5</value>
public $1 $2
{
get {
return this.$2;
}
set {
this.$2 = value;
}
}
21 changes: 21 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/attrib.2
@@ -0,0 +1,21 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private _attribute ....; public Property ... ... { ... }
# --
/// <summary>
/// $3
/// </summary>
private $1 ${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")};

/// <summary>
/// ${3:Description}
/// </summary>
/// <value><c>$1</c></value>
public ${1:Type} ${2:Name}
{
get {
return this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")};
}
set {
this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")} = value;
}
}
21 changes: 21 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/class
@@ -0,0 +1,21 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : class ... { ... }
# --
${5:public} class ${1:Name}
{
#region Ctor & Destructor
/// <summary>
/// ${3:Standard Constructor}
/// </summary>
public $1($2)
{
}

/// <summary>
/// ${4:Default Destructor}
/// </summary>
public ~$1()
{
}
#endregion
}
6 changes: 6 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/comment
@@ -0,0 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <summary> ... </summary>
# --
/// <summary>
/// $1
/// </summary>
4 changes: 4 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/comment.1
@@ -0,0 +1,4 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# --
/// <param name="$1">$2</param>
4 changes: 4 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/comment.2
@@ -0,0 +1,4 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# --
/// <returns>$1</returns>
4 changes: 4 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/comment.3
@@ -0,0 +1,4 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <exception cref="..."> ... </exception>
# --
/// <exception cref="$1">$2</exception>
10 changes: 10 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/method
@@ -0,0 +1,10 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : public void Method { ... }
# --
/// <summary>
/// ${5:Description}
/// </summary>${2:$(if (string= (upcase text) "VOID") "" (format "%s%s%s" "\n/// <returns><c>" text "</c></returns>"))}
${1:public} ${2:void} ${3:MethodName}($4)
{
$0
}
7 changes: 7 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/namespace
@@ -0,0 +1,7 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : namespace .. { ... }
# --
namespace $1
{
$0
}
16 changes: 16 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/prop
@@ -0,0 +1,16 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : property ... ... { ... }
# --
/// <summary>
/// $5
/// </summary>
/// <value>$6</value>
$1 $2 $3
{
get {
return this.$4;
}
set {
this.$4 = value;
}
}
6 changes: 6 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/region
@@ -0,0 +1,6 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : #region ... #endregion
# --
#region $1
$0
#endregion
4 changes: 4 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/using
@@ -0,0 +1,4 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using ...;
# --
using $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/using.1
@@ -0,0 +1,4 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System;
# --
using System;
4 changes: 4 additions & 0 deletions snippets/text-mode/cc-mode/csharp-mode/using.2
@@ -0,0 +1,4 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System....;
# --
using System.$1;
6 changes: 6 additions & 0 deletions snippets/text-mode/cc-mode/do
@@ -0,0 +1,6 @@
#name : do { ... } while (...)
# --
do
{
$0
} while (${1:condition});
6 changes: 6 additions & 0 deletions snippets/text-mode/cc-mode/for
@@ -0,0 +1,6 @@
#name : for (...; ...; ...) { ... }
# --
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
{
$0
}
6 changes: 6 additions & 0 deletions snippets/text-mode/cc-mode/if
@@ -0,0 +1,6 @@
#name : if (...) { ... }
# --
if (${1:condition})
{
$0
}
3 changes: 3 additions & 0 deletions snippets/text-mode/cc-mode/inc
@@ -0,0 +1,3 @@
#name : #include "..."
# --
#include "$1"
3 changes: 3 additions & 0 deletions snippets/text-mode/cc-mode/inc.1
@@ -0,0 +1,3 @@
#name : #include <...>
# --
#include <$1>
7 changes: 7 additions & 0 deletions snippets/text-mode/cc-mode/main
@@ -0,0 +1,7 @@
#name: int main(argc, argv) { ... }
# --
int main(int argc, char *argv[])
{
$0
return 0;
}
13 changes: 13 additions & 0 deletions snippets/text-mode/cc-mode/objc-mode/prop
@@ -0,0 +1,13 @@
#name : foo { ... } ; setFoo { ... }
# --
- (${1:id})${2:foo}
{
return $2;
}

- (void)set${2:$(capitalize text)}:($1)aValue
{
[$2 autorelease];
$2 = [aValue retain];
}
$0
8 changes: 8 additions & 0 deletions snippets/text-mode/cc-mode/once
@@ -0,0 +1,8 @@
#name : #ifndef XXX; #define XXX; #endif
# --
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
#define $1

$0

#endif /* $1 */
6 changes: 6 additions & 0 deletions snippets/text-mode/cc-mode/struct
@@ -0,0 +1,6 @@
#name : struct ... { ... }
# --
struct ${1:name}
{
$0
};
3 changes: 3 additions & 0 deletions snippets/text-mode/css-mode/bg
@@ -0,0 +1,3 @@
#name : background-color: ...
# --
background-color: #${1:DDD};
3 changes: 3 additions & 0 deletions snippets/text-mode/css-mode/bg.1
@@ -0,0 +1,3 @@
#name : background-image: ...
# --
background-image: url($1);
3 changes: 3 additions & 0 deletions snippets/text-mode/css-mode/bor
@@ -0,0 +1,3 @@
#name : border size style color
# --
border: ${1:1px} ${2:solid} #${3:999};
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/cl
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : clear: ...
# --
clear: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/disp.block
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: block
# --
display: block;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/disp.inline
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: inline
# --
display: inline;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/disp.none
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: none
# --
display: none;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/ff
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-family: ...
# --
font-family: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/fs
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-size: ...
# --
font-size: ${12px};
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/mar.bottom
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-bottom: ...
# --
margin-bottom: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/mar.left
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-left: ...
# --
margin-left: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/mar.mar
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin: ...
# --
margin: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/mar.margin
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin top right bottom left
# --
margin: ${top} ${right} ${bottom} ${left};
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/mar.right
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-right: ...
# --
margin-right: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/mar.top
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-top: ...
# --
margin-top: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/pad.bottom
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-bottom: ...
# --
padding-bottom: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/pad.left
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-left: ...
# --
padding-left: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/pad.pad
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding: ...
# --
padding: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/pad.padding
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding: top right bottom left
# --
padding: ${top} ${right} ${bottom} ${left};
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/pad.right
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-right: ...
# --
padding-right: $1;
4 changes: 4 additions & 0 deletions snippets/text-mode/css-mode/pad.top
@@ -0,0 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-top: ...
# --
padding-top: $1;
11 changes: 11 additions & 0 deletions snippets/text-mode/emacs-lisp-mode/.read_me
@@ -0,0 +1,11 @@
TITLE: Emacs Idiom Template Set. Version 1. 2009-02-22

DESCRIPTION: Some useful templates for emacs lisp. This template set is based on useful elisp idioms on common tasks.

LICENSING: GPL version 3.

AUTHOR: Xah Lee

Home Page: latest version at:
• Emacs Lisp Idiom Templates
http://xahlee.org/emacs/elisp_idiom_templates.html

0 comments on commit 2426813

Please sign in to comment.