1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins

This commit is contained in:
amix
2017-03-14 16:16:07 +01:00
parent 7b7a056680
commit 395c077dcb
15 changed files with 170 additions and 67 deletions

View File

@ -16,7 +16,7 @@ namespace ${1:MyNamespace}
endsnippet
snippet class "class" w
class ${1:MyClass}
${1:public} class ${2:MyClass}
{
$0
}
@ -288,6 +288,10 @@ snippet cw "Console.WriteLine" b
Console.WriteLine("$1");
endsnippet
snippet cr "Console.ReadLine" b
Console.ReadLine();
endsnippet
# as you first type comma-separated parameters on the right, {n} values appear in the format string
snippet cwp "Console.WriteLine with parameters" b
Console.WriteLine("${2:`!p
@ -300,9 +304,9 @@ MessageBox.Show("${1:message}");
endsnippet
##################
# full methods #
##################
#############
# methods #
#############
snippet equals "Equals method" b
public override bool Equals(object obj)
@ -316,13 +320,53 @@ public override bool Equals(object obj)
}
endsnippet
snippet mth "Method" b
${1:public} ${2:void} ${3:MyMethod}(${4})
{
$0
}
endsnippet
snippet mths "Static method" b
${1:public} static ${2:void} ${3:MyMethod}(${4})
{
$0
}
endsnippet
###############
# constructor #
###############
snippet ctor "Constructor" b
${1:public} ${2:`!p snip.rv = snip.basename or "untitled"`}(${3})
{
$0
}
endsnippet
##############
# comments #
##############
snippet /// "XML comment" b
snippet /// "XML summary comment" b
/// <summary>
/// $1
/// $0
/// </summary>
endsnippet
snippet <p "XML pramameter comment" b
<param name="${1}">${2}</param>
endsnippet
snippet <ex "XML exception comment" b
<exception cref="${1:System.Exception}">${2}</exception>
endsnippet
snippet <r "XML returns comment" b
<returns>$0</returns>
endsnippet
snippet <c "XML code comment" b
<code>$0</code>
endsnippet

View File

@ -56,7 +56,7 @@
#
# Feedback is welcome!
#
# Main
# Main
snippet sim
${1:public }static int Main(string[] args) {
${0}
@ -358,7 +358,7 @@ snippet enum
enum ${1} {
${0}
}
snippet enum+
public enum ${1} {
${0}
@ -378,7 +378,7 @@ snippet <p
snippet <ex
<exception cref="${1:System.Exception}">${2}</exception>
snippet <r
<returns>${1}</returns>{
<returns>${1}</returns>
snippet <s
<see cref="${1}"/>
snippet <rem
@ -398,7 +398,7 @@ snippet eq
${0:throw new NotImplementedException();}
return base.Equals(obj);
}
# exception
# exception
snippet exc
public class ${1:MyException} : ${2:Exception} {
public $1() { }
@ -409,13 +409,13 @@ snippet exc
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
# indexer
# indexer
snippet index
public ${1:object} this[${2:int} index] {
get { ${0} }
set { ${0} }
}
# eventhandler
# eventhandler
snippet inv
EventHandler temp = ${1:MyEvent};
if (${2:temp} != null) {
@ -442,7 +442,7 @@ snippet propf
}
snippet propg
public ${1:int} ${2:MyProperty} { get; private set; }
# switch
# switch
snippet switch
switch (${1:switch_on}) {
${0}