diff --git a/all.snippets b/all.snippets index 01e71f5..98734b2 100644 --- a/all.snippets +++ b/all.snippets @@ -22,7 +22,13 @@ snippet !"! "double quotes" r "${VISUAL}$1"$0 endsnippet -snippet !`! "angled quotes" rw +snippet ``` "tripple angled quotes" +\`\`\`${1} +${VISUAL}${2} +\`\`\`$0 +endsnippet + +snippet !(? { ${VISUAL}${2} -});$0 +})$0 endsnippet snippet it "it block" it('${1}', () => { ${VISUAL}${2} -});$0 +})$0 endsnippet snippet before "before block" before(() => { ${VISUAL}${1} -});$0 +})$0 endsnippet snippet switch "switch case" @@ -56,7 +56,7 @@ endsnippet snippet case "case" case ${1}: ${0:${VISUAL}} - break; + break endsnippet snippet fun "function" @@ -102,27 +102,27 @@ catch { endsnippet snippet while "(condition) { ... }" - while (${1:/* condition */}) { + while (${1}) { ${0:${VISUAL}} } endsnippet snippet import "import" -import ${1} from '${2}';$0 +import ${1} from '${2}'$0 endsnippet snippet imp "import" -import ${1} from '${2}';$0 +import ${1} from '${2}'$0 endsnippet snippet test "test" test('${1}', () => { ${VISUAL}${2} -}); +}) endsnippet snippet impt "import test" -import React from 'react'; -import renderer from 'react-test-renderer'; -import { MockedProvider } from '@apollo/react-testing'; +import React from 'react' +import renderer from 'react-test-renderer' +import { MockedProvider } from '@apollo/react-testing' endsnippet diff --git a/ruby.snippets b/ruby.snippets index a2847a5..9a4d8b9 100644 --- a/ruby.snippets +++ b/ruby.snippets @@ -57,8 +57,8 @@ puts "-------------------" endsnippet snippet class "class" -class ${1} - ${VISUAL}$0 +class ${1:`!p snip.rv = re.sub('_', '', snip.basename.title())`} + ${2:${VISUAL}}$0 end endsnippet