Skip to content

Commit

Permalink
update snips
Browse files Browse the repository at this point in the history
  • Loading branch information
aalvarado committed Aug 26, 2022
1 parent a4068ea commit 40f67ab
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
16 changes: 13 additions & 3 deletions all.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -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 !(?<!`)`! "angled quotes" r
\`${1:${VISUAL}}\`$0
endsnippet

Expand All @@ -38,14 +44,18 @@ snippet '\[ ' "square brackets w space" r
[ ${VISUAL}$1 ]$0
endsnippet

snippet ''' "tripple quotes" bw
snippet !'''! "tripple quotes" bw
'''$1
${VISUAL}$2
'''$0
endsnippet

snippet """ "tripple double quotes"
snippet !"""! "tripple double quotes"
"""$1
${VISUAL}$2
"""
endsnippet

snippet today "Today's date"
`date +%F`
endsnippet
30 changes: 15 additions & 15 deletions javascript.snippets
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
snippet clb "console log box"
console.log('-----------');
console.log(${VISUAL}${1});$0
console.log('-----------');
console.log('-----------')
console.log(${VISUAL}${1})$0
console.log('-----------')
endsnippet

snippet cl "console log" b
console.log(${1}${VISUAL});$0
console.log(${1}${VISUAL})$0
endsnippet

snippet if "if" w
Expand All @@ -31,19 +31,19 @@ endsnippet
snippet desc "describe block"
describe('${1}', () => {
${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"
Expand All @@ -56,7 +56,7 @@ endsnippet
snippet case "case"
case ${1}:
${0:${VISUAL}}
break;
break
endsnippet

snippet fun "function"
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions ruby.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 40f67ab

Please sign in to comment.