mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Closes #372: removed trailing spaces in snippets
This commit is contained in:
parent
9df05fc413
commit
8bf75fe425
@ -1,4 +1,4 @@
|
||||
# name: namespace ...
|
||||
# key: ns
|
||||
# --
|
||||
namespace
|
||||
namespace
|
@ -1,4 +1,4 @@
|
||||
# name: using namespace ...
|
||||
# name: using namespace ...
|
||||
# key: using
|
||||
# --
|
||||
using namespace ${std};
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: printf
|
||||
# name: printf
|
||||
# contributor: joaotavora
|
||||
# key: printf
|
||||
# --
|
||||
|
@ -14,7 +14,7 @@ ${5:public} class ${1:Name}
|
||||
|
||||
/// <summary>
|
||||
/// ${4:Default Destructor}
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public ~$1()
|
||||
{
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
# key: x-dired
|
||||
# --
|
||||
;; idiom for processing a list of files in dired's marked files
|
||||
|
||||
|
||||
;; suppose myProcessFile is your function that takes a file path
|
||||
;; and do some processing on the file
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
(buffer-string) "\n" t)) )
|
||||
|
||||
;; process all lines
|
||||
(mapc
|
||||
(lambda (aLine)
|
||||
(mapc
|
||||
(lambda (aLine)
|
||||
(message aLine) ; do your stuff here
|
||||
)
|
||||
(read-lines "inputFilePath")
|
||||
|
@ -6,7 +6,7 @@
|
||||
"Replace “<” to “<” and other chars in HTML.
|
||||
This works on the current region."
|
||||
(interactive "r")
|
||||
(save-restriction
|
||||
(save-restriction
|
||||
(narrow-to-region start end)
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "&" nil t) (replace-match "&" nil t))
|
||||
|
@ -2,4 +2,4 @@
|
||||
# name: automatic
|
||||
# key: au
|
||||
# --
|
||||
automatic $0
|
||||
automatic $0
|
@ -1,5 +1,5 @@
|
||||
# contributor: Li Zhu <http://www.zhuli.name>
|
||||
# name: implicit integer
|
||||
# name: implicit integer
|
||||
# key: ii
|
||||
# --
|
||||
implicit integer $0
|
@ -1,4 +1,4 @@
|
||||
# name: <div...>...</div>
|
||||
# key: div
|
||||
# --
|
||||
<div${1: id="${2:some_id}"}${3: class="${4:some_class}"}>$0</div>
|
||||
<div${1: id="${2:some_id}"}${3: class="${4:some_class}"}>$0</div>
|
@ -1,5 +1,5 @@
|
||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
|
||||
#name :<script type="text/javascript">...</script>
|
||||
#name :<script type="text/javascript">...</script>
|
||||
# key: script
|
||||
# --
|
||||
<script type="text/javascript">
|
||||
|
@ -1,5 +1,5 @@
|
||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
|
||||
#name :<script type="text/javascript" src="..."></script>
|
||||
#name :<script type="text/javascript" src="..."></script>
|
||||
# key: script
|
||||
# --
|
||||
<script type="text/javascript" src="$1"></script>
|
@ -7,7 +7,7 @@
|
||||
def ${1:name}($2):
|
||||
"""$3
|
||||
${2:$
|
||||
(let*
|
||||
(let*
|
||||
((indent
|
||||
(concat "\n" (make-string (current-column) 32)))
|
||||
(args
|
||||
|
@ -1,4 +1,4 @@
|
||||
# name: # =>
|
||||
# key: #
|
||||
# --
|
||||
# =>
|
||||
# =>
|
@ -1,5 +1,5 @@
|
||||
# Author: Jonas Bonèr <jonas@jonasboner.com>
|
||||
# name: asInstanceOf[T]
|
||||
# name: asInstanceOf[T]
|
||||
# key: asof
|
||||
# --
|
||||
asInstanceOf[${1:type}] $0
|
@ -1,5 +1,5 @@
|
||||
# Author: Jonas Bonèr <jonas@jonasboner.com>
|
||||
# name: case pattern =>
|
||||
# name: case pattern =>
|
||||
# key: case
|
||||
# --
|
||||
case ${1:pattern} => $0
|
@ -1,5 +1,5 @@
|
||||
# Author: Jonas Bonèr <jonas@jonasboner.com>
|
||||
# name: case _ =>
|
||||
# name: case _ =>
|
||||
# key: case
|
||||
# --
|
||||
case _ => $0
|
@ -1,5 +1,5 @@
|
||||
# Author: Jonas Bonèr <jonas@jonasboner.com>
|
||||
# name: asInstanceOf[T]
|
||||
# name: asInstanceOf[T]
|
||||
# key: cast
|
||||
# --
|
||||
asInstanceOf[${1:type}] $0
|
@ -1,5 +1,5 @@
|
||||
# Author: Jonas Bonèr <jonas@jonasboner.com>
|
||||
# name: classOf[T]
|
||||
# name: classOf[T]
|
||||
# key: clof
|
||||
# --
|
||||
classOf[${1:type}] $0
|
@ -2,8 +2,8 @@
|
||||
# name: /** cls/trt/obj name */
|
||||
# key: doc
|
||||
# --
|
||||
/**
|
||||
/**
|
||||
* `(scala-mode-find-clstrtobj-name-doc)`
|
||||
* ${1:description}
|
||||
* $0
|
||||
* $0
|
||||
*/
|
@ -2,6 +2,6 @@
|
||||
# name: /** method name */
|
||||
# key: doc
|
||||
# --
|
||||
/**
|
||||
/**
|
||||
* `(scala-mode-def-and-args-doc)`
|
||||
*/
|
||||
*/
|
@ -6,5 +6,5 @@
|
||||
* `(scala-mode-file-doc)`
|
||||
* $0
|
||||
* @author ${1:name}
|
||||
* @version ${2:0.1}
|
||||
* @version ${2:0.1}
|
||||
*/
|
@ -9,9 +9,9 @@
|
||||
** /____/\___/_/ |_/____/_/ | | **
|
||||
** |/ **
|
||||
\* */
|
||||
/**
|
||||
/**
|
||||
* $0
|
||||
* @author ${1:name}
|
||||
* @author ${1:name}
|
||||
* @version ${2:0.1}
|
||||
* $Id$
|
||||
*/
|
@ -9,9 +9,9 @@
|
||||
** /____/\___/_/ |_/____/_/ | | **
|
||||
** |/ **
|
||||
\* */
|
||||
/**
|
||||
/**
|
||||
* $0
|
||||
* @author ${1:name}
|
||||
* @author ${1:name}
|
||||
* @version ${2:0.1}
|
||||
* $Id$
|
||||
*/
|
@ -1,5 +1,5 @@
|
||||
# Author: Jonas Bonèr <jonas@jonasboner.com>
|
||||
# name: isInstanceOf[T]
|
||||
# name: isInstanceOf[T]
|
||||
# key: isof
|
||||
# --
|
||||
isInstanceOf[${1:type}] $0
|
@ -5,8 +5,8 @@
|
||||
${1:option} match {
|
||||
case Full(res) => $0
|
||||
|
||||
case Empty =>
|
||||
case Empty =>
|
||||
|
||||
case Failure(msg, _, _) =>
|
||||
case Failure(msg, _, _) =>
|
||||
|
||||
}
|
@ -4,6 +4,6 @@
|
||||
# --
|
||||
${1:option} match {
|
||||
case None => $0
|
||||
case Some(res) =>
|
||||
case Some(res) =>
|
||||
|
||||
}
|
@ -5,6 +5,6 @@
|
||||
try {
|
||||
$0
|
||||
} catch {
|
||||
case ${1:e}: ${2:Exception} =>
|
||||
case ${1:e}: ${2:Exception} =>
|
||||
${1:println(\"ERROR: \" + e) // TODO: handle exception}\n}
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
try {
|
||||
$0
|
||||
} catch {
|
||||
case ${1:e}: ${2:Exception} =>
|
||||
case ${1:e}: ${2:Exception} =>
|
||||
${1:println(\"ERROR: \" + e) // TODO: handle exception}\n}
|
||||
} finally {
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
# name: CONSTRAINT [..] PRIMARY KEY ...
|
||||
# key: constraint
|
||||
# --
|
||||
CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}])
|
||||
CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}])
|
@ -2,4 +2,4 @@
|
||||
# name: CONSTRAINT [..] FOREIGN KEY ...
|
||||
# key: constraint
|
||||
# --
|
||||
CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}])
|
||||
CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}])
|
@ -2,10 +2,10 @@
|
||||
# name: create table ...
|
||||
# key: create
|
||||
# --
|
||||
CREATE TABLE [${1:dbo}].[${2:TableName}]
|
||||
CREATE TABLE [${1:dbo}].[${2:TableName}]
|
||||
(
|
||||
${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL}
|
||||
$0
|
||||
CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3])
|
||||
CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3])
|
||||
)
|
||||
GO
|
@ -2,7 +2,7 @@
|
||||
# name: create procedure ...
|
||||
# key: create
|
||||
# --
|
||||
CREATE PROCEDURE [${1:dbo}].[${2:Name}]
|
||||
CREATE PROCEDURE [${1:dbo}].[${2:Name}]
|
||||
(
|
||||
$3 $4 = ${5:NULL} ${6:OUTPUT}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user