mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -126,16 +126,24 @@ snippet doc
|
||||
@doc """
|
||||
${0}
|
||||
"""
|
||||
snippet im
|
||||
@impl true
|
||||
snippet docs
|
||||
@doc ~S"""
|
||||
${0}
|
||||
"""
|
||||
snippet docf
|
||||
@doc false
|
||||
snippet im
|
||||
@impl true
|
||||
snippet fn
|
||||
fn ${1:args} -> ${0} end
|
||||
snippet mdoc
|
||||
@moduledoc """
|
||||
${0}
|
||||
"""
|
||||
snippet mdocs
|
||||
@moduledoc ~S"""
|
||||
${0}
|
||||
"""
|
||||
snippet mdocf
|
||||
@moduledoc false
|
||||
snippet rec
|
||||
@ -237,3 +245,7 @@ snippet impl
|
||||
def ${1:name} do
|
||||
${0}
|
||||
end
|
||||
snippet wl word list
|
||||
~w(${0})
|
||||
snippet al atom list
|
||||
~w(${0})a
|
||||
|
@ -148,6 +148,12 @@ snippet doc_v
|
||||
* @var ${4:string}
|
||||
*/
|
||||
${1:var} $${2};
|
||||
|
||||
# Class attribute with short comment
|
||||
snippet att
|
||||
/** @var ${3:string} */
|
||||
${1:public} $${2};
|
||||
|
||||
# Class
|
||||
snippet doc_c
|
||||
/**
|
||||
|
@ -24,8 +24,7 @@ snippet docs
|
||||
|
||||
# Unittest skip
|
||||
snippet sk "skip unittests" b
|
||||
@unittest.skip(${1:skip_reason})
|
||||
endsnippet
|
||||
@unittest.skip(${1:skip_reason})
|
||||
|
||||
snippet wh
|
||||
while ${1:condition}:
|
||||
@ -241,7 +240,7 @@ snippet addaarg
|
||||
parser.add_argument("${0:arg}", "${1:long_arg}", action="${2:store_true}", default=${3:False}, help="${4:Help text}")
|
||||
snippet pargs
|
||||
"${VISUAL:return }"parser.parse_args()
|
||||
|
||||
|
||||
# logging
|
||||
# glog = get log
|
||||
snippet glog
|
||||
@ -314,14 +313,14 @@ snippet contain "methods for emulating a container type" b
|
||||
|
||||
def __contains__(self, item):
|
||||
${7:pass}
|
||||
|
||||
|
||||
snippet context "context manager methods" b
|
||||
def __enter__(self):
|
||||
${1:pass}
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
${2:pass}
|
||||
|
||||
|
||||
snippet attr "methods for customizing attribute access" b
|
||||
def __getattr__(self, name):
|
||||
${1:pass}
|
||||
@ -331,7 +330,7 @@ snippet attr "methods for customizing attribute access" b
|
||||
|
||||
def __delattr__(self, name):
|
||||
${3:pass}
|
||||
|
||||
|
||||
snippet desc "methods implementing descriptors" b
|
||||
def __get__(self, instance, owner):
|
||||
${1:pass}
|
||||
@ -341,7 +340,7 @@ snippet desc "methods implementing descriptors" b
|
||||
|
||||
def __delete__(self, instance):
|
||||
${3:pass}
|
||||
|
||||
|
||||
snippet cmp "methods implementing rich comparison"
|
||||
def __eq__(self, other):
|
||||
${1:pass}
|
||||
@ -363,7 +362,7 @@ snippet cmp "methods implementing rich comparison"
|
||||
|
||||
def __cmp__(self, other):
|
||||
${7:pass}
|
||||
|
||||
|
||||
snippet repr "methods implementing string representation"
|
||||
def __repr__(self):
|
||||
${1:pass}
|
||||
@ -373,7 +372,7 @@ snippet repr "methods implementing string representation"
|
||||
|
||||
def __unicode__(self):
|
||||
${3:pass}
|
||||
|
||||
|
||||
# note: reflected operands and augmented arithmeitc assignements have been
|
||||
# intentionally ommited to reduce verbosity.
|
||||
snippet numeric "methods for emulating a numeric type" b
|
||||
@ -454,4 +453,4 @@ snippet numeric "methods for emulating a numeric type" b
|
||||
|
||||
def __coerce__(self, other):
|
||||
${25:pass}
|
||||
|
||||
|
||||
|
@ -44,7 +44,11 @@ snippet pln, "println! with format param"
|
||||
println!("${1}{${2}}", ${3});
|
||||
snippet fmt "format!"
|
||||
format!("${1}{${2}}", ${3});
|
||||
|
||||
snippet d "dbg! debugging macro"
|
||||
dbg!(${0:${VISUAL}})
|
||||
snippet d; "dbg! debugging macro statement"
|
||||
dbg!(&${1});
|
||||
${0}
|
||||
# Modules
|
||||
snippet ec "extern crate"
|
||||
extern crate ${1:sync};
|
||||
@ -72,9 +76,11 @@ snippet testmod "Test module" b
|
||||
|
||||
test${0}
|
||||
}
|
||||
snippet ig "#[ignore]"
|
||||
#[ignore]
|
||||
# Attributes
|
||||
snippet allow "allow lint attribute" b
|
||||
#[allow(${1:unused_variable})]
|
||||
#[allow(${1:unused_variables})]
|
||||
snippet cfg "cfg attribute" b
|
||||
#[cfg(${1:target_os = "linux"})]
|
||||
snippet feat "feature attribute" b
|
||||
|
Reference in New Issue
Block a user