) {
+ ${0}
+ }
snippet ret
return ${0}
snippet whe
diff --git a/sources_non_forked/vim-snippets/snippets/perl6.snippets b/sources_non_forked/vim-snippets/snippets/perl6.snippets
index 21ddf5bd..aa740605 100644
--- a/sources_non_forked/vim-snippets/snippets/perl6.snippets
+++ b/sources_non_forked/vim-snippets/snippets/perl6.snippets
@@ -28,7 +28,7 @@ snippet ife
${3}
}
snippet eif
- elsif ${1) {
+ elsif ${1} {
${2}
}
# Conditional One-line
diff --git a/sources_non_forked/vim-snippets/snippets/python.snippets b/sources_non_forked/vim-snippets/snippets/python.snippets
index 179ce64f..9b3798b8 100644
--- a/sources_non_forked/vim-snippets/snippets/python.snippets
+++ b/sources_non_forked/vim-snippets/snippets/python.snippets
@@ -88,11 +88,11 @@ snippet property
@property
def ${1:foo}(self) -> ${2:type}:
"""${3:doc}"""
- return self._${1:foo}
+ return self._$1
- @${1:foo}.setter
- def ${1:foo}(self, value: ${2:type}):
- self._${1:foo} = value
+ @$1.setter
+ def $1(self, value: $2):
+ self._$1 = value
# Ifs
snippet if
@@ -159,6 +159,10 @@ snippet ifmain
# __magic__
snippet _
__${1:init}__
+
+# debugger breakpoint
+snippet br
+ breakpoint()
# python debugger (pdb)
snippet pdb
__import__('pdb').set_trace()
diff --git a/sources_non_forked/vim-snippets/snippets/rails.snippets b/sources_non_forked/vim-snippets/snippets/rails.snippets
index 4678de92..624a48c2 100644
--- a/sources_non_forked/vim-snippets/snippets/rails.snippets
+++ b/sources_non_forked/vim-snippets/snippets/rails.snippets
@@ -274,22 +274,6 @@ snippet sl
end
snippet sha1
Digest::SHA1.hexdigest(${0:string})
-snippet sweeper
- class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper
- observe $1
-
- def after_save(${0:model_class_name})
- expire_cache($2)
- end
-
- def after_destroy($2)
- expire_cache($2)
- end
-
- def expire_cache($2)
- expire_page
- end
- end
snippet va validates_associated
validates_associated :${0:attribute}
snippet va validates .., acceptance: true
diff --git a/sources_non_forked/vim-snippets/snippets/ruby.snippets b/sources_non_forked/vim-snippets/snippets/ruby.snippets
index 3c9eec52..20c789b5 100644
--- a/sources_non_forked/vim-snippets/snippets/ruby.snippets
+++ b/sources_non_forked/vim-snippets/snippets/ruby.snippets
@@ -598,6 +598,8 @@ snippet begin
#debugging
snippet debug
require 'byebug'; byebug
+snippet dbg
+ require 'debug'; debugger
snippet debug19
require 'debugger'; debugger
snippet debug18
diff --git a/sources_non_forked/vim-snippets/snippets/scheme.snippets b/sources_non_forked/vim-snippets/snippets/scheme.snippets
index bdd445f9..4c0c78a0 100644
--- a/sources_non_forked/vim-snippets/snippets/scheme.snippets
+++ b/sources_non_forked/vim-snippets/snippets/scheme.snippets
@@ -17,7 +17,7 @@ snippet *
# Definition
snippet def
(define (${1:name})
- (${0:definition}))
+ ${0:definition})
# Definition with lambda
snippet defl
diff --git a/sources_non_forked/vim-snippets/snippets/sh.snippets b/sources_non_forked/vim-snippets/snippets/sh.snippets
index 2ce67ec4..b92ae952 100644
--- a/sources_non_forked/vim-snippets/snippets/sh.snippets
+++ b/sources_non_forked/vim-snippets/snippets/sh.snippets
@@ -55,7 +55,7 @@ snippet go
done
# Set SCRIPT_DIR variable to directory script is located.
snippet sdir
- SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+ SCRIPT_DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
# getopt
snippet getopt
__ScriptVersion="${1:version}"
@@ -66,7 +66,7 @@ snippet getopt
#===============================================================================
function usage ()
{
- echo "Usage : $${0:0} [options] [--]
+ echo "Usage : \$${0:0} [options] [--]
Options:
-h|help Display this message
@@ -80,18 +80,18 @@ snippet getopt
while getopts ":hv" opt
do
- case $opt in
+ case \$opt in
h|help ) usage; exit 0 ;;
- v|version ) echo "$${0:0} -- Version $__ScriptVersion"; exit 0 ;;
+ v|version ) echo "\$${0:0} -- Version \$__ScriptVersion"; exit 0 ;;
- * ) echo -e "\n Option does not exist : $OPTARG\n"
+ * ) echo -e "\\n Option does not exist : \$OPTARG\\n"
usage; exit 1 ;;
esac # --- end of case ---
done
- shift $(($OPTIND-1))
+ shift \$(($OPTIND-1))
snippet root
if [ \$(id -u) -ne 0 ]; then exec sudo \$0; fi
diff --git a/sources_non_forked/vim-snippets/snippets/vue.snippets b/sources_non_forked/vim-snippets/snippets/vue.snippets
index 1385ecb7..9462635f 100644
--- a/sources_non_forked/vim-snippets/snippets/vue.snippets
+++ b/sources_non_forked/vim-snippets/snippets/vue.snippets
@@ -50,7 +50,7 @@ snippet vactions
${1:updateValue}({commit}, ${2:payload}) {
commit($1, $2);
}
- }
+ },
# Add in js animation hooks
snippet vanim:js:el
@@ -106,14 +106,33 @@ snippet vdata
return {
${1:key}: ${2:value}
};
- }
+ },
+
+snippet vmounted
+ mounted() {
+ console.log('mounted');
+ },
+
+snippet vmethods
+ methods: {
+ ${1:method}() {
+ console.log('method');
+ }
+ },
+
+snippet vcomputed
+ computed: {
+ ${1:fnName}() {
+ return;
+ }
+ },
snippet vfilter
filters: {
${1:fnName}: function(${2:value}) {
return;
}
- }
+ },
snippet vfor
@@ -125,7 +144,7 @@ snippet vgetters
${1:value}: state => {
return state.$1;
}
- }
+ },
snippet vimport
import ${1:New} from './components/$1.vue';
@@ -152,7 +171,7 @@ snippet vmutations
${1:updateValue}(state, ${3:payload}) => {
state.${2:value} = $3;
}
- }
+ },
snippet vprops:d
${1:propName}: {
diff --git a/sources_non_forked/vim-snippets/tests.sh b/sources_non_forked/vim-snippets/tests.sh
old mode 100644
new mode 100755