(Emacs/yasnippet)~cleaned up a TON of snippets

This commit is contained in:
2024-05-11 13:02:20 +05:30
parent 750722d463
commit 48b1410889
452 changed files with 39 additions and 3098 deletions

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: define
# key: def
# uuid: def
# --
#define $0

View File

@@ -3,5 +3,5 @@
# key: malloc
# uuid: malloc
# --
malloc(sizeof($1)${2: * ${3:3}});
malloc(sizeof($1)${2: * ${3:0}});
$0

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: packed
# key: packed
# uuid: packed
# --
__attribute__((__packed__))$0

View File

@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
# name: printf
# key: p
# uuid: p
# key: printf
# uuid: printf
# --
printf("${1:format}"${2:, $3});

View File

@@ -1,4 +0,0 @@
# -*- mode: snippet -*-
# name: stdio
# --
#include <stdio.h>

View File

@@ -1,4 +0,0 @@
# -*- mode: snippet -*-
# name: stdlib
# --
#include <stdlib.h>

View File

@@ -1,4 +0,0 @@
# -*- mode: snippet -*-
# name: string
# --
#include <string.h>

View File

@@ -3,6 +3,6 @@
# key: union
# uuid: union
# --
typedef union {
union ${1:name} {
$0
} ${1:name};
};

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: unistd
# key: uni
# uuid: uni
# --
#include <unistd.h>

View File

@@ -3,5 +3,4 @@
# key: ass
# uuid: ass
# --
#include <assert.h>
$0
assert($1 && $2);

View File

@@ -3,7 +3,7 @@
# key: once
# uuid: once
# --
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H}
#ifndef $1
#define $1
$0

View File

@@ -1 +0,0 @@
cc-mode text-mode prog-mode

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private attribute ....;
# key: attrib
# uuid: attrib
# --
/// <summary>
/// $3
/// </summary>
private $1 $2;

View File

@@ -1,24 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private attribute ....; public property ... ... { ... }
# key: attrib
# uuid: attrib
# --
/// <summary>
/// $3
/// </summary>
private $1 $2;
/// <summary>
/// $4
/// </summary>
/// <value>$5</value>
public $1 $2
{
get {
return this.$2;
}
set {
this.$2 = value;
}
}

View File

@@ -1,24 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private _attribute ....; public Property ... ... { ... }
# key: attrib
# uuid: attrib
# --
/// <summary>
/// $3
/// </summary>
private $1 ${2:$(if (> (length yas-text) 0) (format "_%s%s" (downcase (substring yas-text 0 1)) (substring yas-text 1 (length yas-text))) "")};
/// <summary>
/// ${3:Description}
/// </summary>
/// <value><c>$1</c></value>
public ${1:Type} ${2:Name}
{
get {
return this.${2:$(if (> (length yas-text) 0) (format "_%s%s" (downcase (substring yas-text 0 1)) (substring yas-text 1 (length yas-text))) "")};
}
set {
this.${2:$(if (> (length yas-text) 0) (format "_%s%s" (downcase (substring yas-text 0 1)) (substring yas-text 1 (length yas-text))) "")} = value;
}
}

View File

@@ -1,24 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: class ... { ... }
# key: class
# uuid: 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
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <summary> ... </summary>
# key: comment
# uuid: comment
# --
/// <summary>
/// $1
/// </summary>

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <param name="..."> ... </param>
# key: comment
# uuid: comment
# --
/// <param name="$1">$2</param>

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <param name="..."> ... </param>
# key: comment
# uuid: comment
# --
/// <returns>$1</returns>

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <exception cref="..."> ... </exception>
# key: comment
# uuid: comment
# --
/// <exception cref="$1">$2</exception>

View File

@@ -1,13 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: public void Method { ... }
# key: method
# uuid: method
# --
/// <summary>
/// ${5:Description}
/// </summary>${2:$(if (string= (upcase yas-text) "VOID") "" (format "%s%s%s" "\n/// <returns><c>" yas-text "</c></returns>"))}
${1:public} ${2:void} ${3:MethodName}($4)
{
$0
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: namespace .. { ... }
# key: namespace
# uuid: namespace
# --
namespace $1
{
$0
}

View File

@@ -1,19 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: property ... ... { ... }
# key: prop
# uuid: prop
# --
/// <summary>
/// $5
/// </summary>
/// <value>$6</value>
$1 $2 $3
{
get {
return this.$4;
}
set {
this.$4 = value;
}
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: #region ... #endregion
# key: region
# uuid: region
# --
#region $1
$0
#endregion

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using ...;
# key: using
# uuid: using
# --
using $1;

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using System;
# key: using
# uuid: using
# --
using System;

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using System....;
# key: using
# uuid: using
# --
using System.$1;

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: @import url("//fonts.googleapis...")
# key: impfont
# uuid: impfont
# --
@import url("http://fonts.googleapis.com/css?family=${1:Open+Sans}");

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: margin: ...;
# key: mar
# uuid: mar
# --
margin: ${1:0 auto};

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: @media
# key: med
# uuid: med
# --
@media ${1:screen} {
$0
}

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: @media (orientation: ?)
# condition: (looking-back "@media " (line-beginning-position))
# --
(orientation: ${1:landscape})

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: @media print { ... }
# --
@media print {
$0
}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: padding: ...;
# key: pad
# uuid: pad
# --
padding: ${1:10px};

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: ...: ...;
# key: :
# uuid: :
# --
${1:prop}: ${2:};

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: case
# key: case
# uuid: case
# --
case ${1:var} of
${2:cond} -> ${3:value}
$0
otherwise -> ${4:other}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: data
# key: da
# uuid: da
# --
data ${1:Type} = $2

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: doc
# key: d
# uuid: d
# --
{-
$0
-}

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: Function
# key: ::
# uuid: ::
# --
${1:fn-name} :: ${2:type}
$1

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: import
# key: import
# uuid: import
# --
import${1: qualified} ${2:Module${3:(symbols)}}${4: as ${5:alias}}

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: instance
# key: ins
# uuid: ins
# --
instance ${1:${2:(Show a)} => }${3:Ord} ${4:DataType} where
$0

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: main
# key: main
# uuid: main
# --
main = do $0

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: module
# key: mod
# uuid: mod
# --
module ${1:Module} where
$0

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: new class
# key: class
# uuid: class
# --
class ${1:Class Name} where
$0

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: pragma
# key: {
# uuid: {
# --
{-# ${1:PRAGMA} #-}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: print
# key: pr
# uuid: pr
# --
print $0

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# contributor: Rodrigo Setti <rodrigosetti@gmail.com>
# name: <dd> ... </dd>
# group: list
# --
<dd>$1</dd>

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# contributor: Rodrigo Setti <rodrigosetti@gmail.com>
# name: <dl> ... </dl>
# group: list
# --
<dl>
$0
</dl>

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: Doctype HTML 5
# group: meta
# --
<!DOCTYPE html>

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: DocType XHTML 1.0 frameset
# group: meta
# --
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: DocType XHTML 1.1
# group: meta
# --
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: DocType XHTML 1.0 Strict
# group: meta
# --
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: DocType XHTML 1.0 Transitional
# group: meta
# --
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# contributor: Rodrigo Setti <rodrigosetti@gmail.com>
# name: <dt> ... </dt>
# group: list
# --
<dt>$1</dt>

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
# name: <form method="..." id="..." action="..."></form>
# --
<form method="$1" id="$2" action="$3">
$0
</form>

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
# name: <html>...</html>
# --
<html>
$0
</html>

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
# name: <html xmlns="...">...</html>
# --
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${1:en}" lang="${2:en}">
$0
</html>

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: <link rel="stylesheet" ... />
# key: link
# uuid: link
# --
<link rel="${1:stylesheet}" href="${2:url}" type="${3:text/css}" media="${4:screen}" />

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: <!--[if IE]><link stylesheet="..." /><![endif]-->
# --
<!--[if IE${1: version}]>
<link rel="${2:stylesheet}" href="${3:url}" type="${4:text/css}" media="${5:screen}" />
<![endif]-->

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# contributor : Jimmy Wu <frozenthrone88@gmail.com>
# group: meta
# name: <meta name="..." content="..." />
# --
<meta name="${1:generator}" content="${2:content}" />

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
# name: <meta http-equiv="..." content="..." />
# group: meta
# --
<meta name="${1:Content-Type}" content="${2:text/html; charset=UTF-8}" />

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: <script type="text/javascript">...</script>
# --
<script type="text/javascript">
$0
</script>

View File

@@ -1,4 +0,0 @@
# -*- mode: snippet -*-
# name: <script type="text/javascript" src="..."></script>
# --
<script type="text/javascript" src="$1"></script>

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
# name: <textarea ...></textarea>
# --
<textarea name="$1" id="$2" rows="$3" cols="$4" tabindex="$5"></textarea>

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
# name: <th>...</th>
# group: table
# --
<th$1>$2</th>

View File

@@ -1 +0,0 @@
cc-mode text-mode prog-mode

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: param
# key: @param
# uuid: @param
# condition: (sp-point-in-comment)
# --
@param ${1:paramater} $0

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: return
# key: @return
# uuid: @return
# condition: (sp-point-in-comment)
# --
@return ${1:description}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: apr_assert
# key: apr_assert
# uuid: apr_assert
# --
if (Globals.useAssertions) {
${1:assert ..};
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: class
# key: class
# uuid: class
# --
${1:public }class ${2:`(f-base buffer-file-name)`} {
$0
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: constructor
# key: __init__
# uuid: __init__
# --
public ${1:`(f-base buffer-file-name)`}($2) {
$0
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: doc
# key: /*
# uuid: /*
# condition: (not (use-region-p))
# --
/**
* $0
*/

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: equals
# key: eq
# uuid: eq
# --
public boolean equals(${1:Class} other) {
$0
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: file_class
# key: file
# uuid: file
# --
public class ${1:`(file-name-base
(or (buffer-file-name)
(buffer-name)))`} {
$0
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: for
# key: for
# uuid: for
# --
for (${1:int i = 0}; ${2:i < N}; ${3:i++}) {
$0
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: foreach
# key: fore
# uuid: fore
# --
for (${1:Object} ${2:var} : ${3:iterator}) {
$0
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: if
# key: if
# uuid: if
# condition: (not (sp-point-in-string-or-comment))
# --
if (${1:true}) {
$0
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: ife
# key: ife
# uuid: ife
# --
if (${1:true}) {
$2
} else {
$0
}

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: import
# --
import ${1:System.};
$0

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: interface
# key: interface
# uuid: interface
# --
interface ${1:`(f-base buffer-file-name)`} {
$0
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: iterator
# key: iterator
# uuid: iterator
# --
public Iterator<${1:type}> iterator() {
$0
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: javadoc
# key: doc
# uuid: doc
# --
/**
* $0
*
*/

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: main
# key: main
# uuid: main
# --
public static void main(String[] args) {
$0
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: method
# key: method
# uuid: method
# condition: (not (sp-point-in-string-or-comment))
# --
${1:void} ${2:name}($3) {
$0
}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: @Override method
# key: method@
# uuid: method@
# condition: (not (sp-point-in-string-or-comment))
# --
@Override ${1:public} ${2:void} ${3:methodName}($4) {
$0
}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: new
# key: new
# uuid: new
# --
${1:Type} ${2:obj} = new ${3:$1}($4);$0

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: paintComponent (Swing)
# key: paintComponent
# uuid: paintComponent
# condition: (not (sp-point-in-string-or-comment))
# --
@Override public void paintComponent(Graphics g) {
$0
}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: printf
# key: printf
# uuid: printf
# --
System.out.printf("$0%n");

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: println
# key: println
# uuid: println
# --
System.out.println("$0");

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: private
# key: pri
# uuid: pri
# --
private $0

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: protected
# key: pr
# uuid: pr
# --
protected $0

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: public
# key: p
# uuid: p
# --
public $0

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: return
# key: ret
# uuid: ret
# condition: (not (sp-point-in-string-or-comment))
# --
return $0;

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: test
# key: test
# uuid: test
# --
@Test
public void test_${1:Case}() {
$0
}

View File

@@ -1,13 +0,0 @@
# -*- mode: snippet -*-
# name: testClass
# key: tc
# uuid: tc
# --
import junit.framework.*;
import junit.textui.*;
public class Test${1:Class} extends TestCase {
protected void setUp() {
$0
}
}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: this
# key: .
# uuid: .
# --
this.$0

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: toString
# key: toStr
# uuid: toStr
# --
public String toString() {
$0
}

View File

@@ -1,12 +0,0 @@
# -*- mode: snippet -*-
# name: try
# key: try
# uuid: try
# condition: (not (sp-point-in-string-or-comment))
# --
try {
$0
} catch (${1:Throwable} e) {
${2:System.out.println("Error " + e.getMessage());
e.printStackTrace();}
}

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: variable declaration
# key: var
# uuid: var
# condition: (not (sp-point-in-string-or-comment))
# --
${1:int} ${2:variable}

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: variable declaration & assignment
# key: var=
# uuid: var=
# condition: (not (sp-point-in-string-or-comment))
# --
${1:int} ${2:variable} = $0;

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: void
# key: v
# uuid: v
# --
void $0

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