Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phts/snippets

My snippets for Sublime Text 3
https://github.com/phts/snippets

sublime-package sublime-snippets sublime-text sublime-text-3

Last synced: 30 days ago
JSON representation

My snippets for Sublime Text 3

Awesome Lists containing this project

README

        

# Snippets

For Sublime Text 3.

## Install

### Package Control

1. Open Command Palette → `Package Control: Add Repository` → `https://github.com/phts/Snippets`
2. Open Command Palette → `Package Control: Install Package` → `Snippets`

## Content

### Ruby

1. `return … if …`
1. `return … unless …`

#### Rspec

1. `after … do … end`
1. `allow(…).to`
1. `before … do … end`
1. `context '…' do … end`
1. `describe '…' do … end`
1. `described_class`
1. `expect(…).to`
1. `it '…' do … end`
1. `it { should … }`
1. `it_behaves_like '…'`
1. `its(…) { should … }`
1. `let(…) do … end`
1. `let(…) { … }`
1. `pending '…'`
1. `receive(…).with(…).and_return(…)`
1. `shared_examples '…' do |…| … end`
1. `should_receive(…).with(…).and_return(…)`
1. `stub(…).with(…).and_return(…)`
1. `subject { … }`

### EcmaScript-like languages (JavaScript, TypeScript)

1. `… => …`
1. `constructor(…) { … }`
1. `constructor(props) { … }`
1. `export default …`
1. `export … from …`
1. `export …`
1. `function … { … }`
1. `if (…) return …;`
1. `if (…) { … }`
1. `import … from …`
1. `import {…} from …`

#### React

1. `import … from './…'`
1. `import styled from 'styled-components'`
1. component template
1. jest test template
1. styled-component template

#### Angular 2

1. `@Component({ … })`
1. `TestBed.configureTestingModule({ … })`
1. import testing stuff template

#### Jest/Jasmine

1. `afterAll(() => { … })`
1. `afterEach(() => { … })`
1. `beforeAll(() => { … })`
1. `beforeEach(() => { … })`
1. `describe(…, () => { … })`
1. `describe('when …', () => { … })`
1. `expect(…).toEqual(…)`
1. `await expect(…).resolves.toEqual(…)`
1. `it(…, () => { … })`
1. `jest.mock(…)`

#### jQuery

1. `$(…)`
1. `$(function() { … })`
1. `on(…, …, function() { … });`