Skip to content

phts/Snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snippets

For Sublime Text 3.

Install

Package Control

  1. Open Command Palette → Package Control: Add Repositoryhttps://github.com/phts/Snippets
  2. Open Command Palette → Package Control: Install PackageSnippets

Content

Ruby

  1. return … if …
  2. return … unless …

Rspec

  1. after … do … end
  2. allow(…).to
  3. before … do … end
  4. context '…' do … end
  5. describe '…' do … end
  6. described_class
  7. expect(…).to
  8. it '…' do … end
  9. it { should … }
  10. it_behaves_like '…'
  11. its(…) { should … }
  12. let(…) do … end
  13. let(…) { … }
  14. pending '…'
  15. receive(…).with(…).and_return(…)
  16. shared_examples '…' do |…| … end
  17. should_receive(…).with(…).and_return(…)
  18. stub(…).with(…).and_return(…)
  19. subject { … }

EcmaScript-like languages (JavaScript, TypeScript)

  1. … => …
  2. constructor(…) { … }
  3. constructor(props) { … }
  4. export default …
  5. export … from …
  6. export …
  7. function … { … }
  8. if (…) return …;
  9. if (…) { … }
  10. import … from …
  11. import {…} from …

React

  1. import … from './…'
  2. import styled from 'styled-components'
  3. component template
  4. jest test template
  5. styled-component template

Angular 2

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

Jest/Jasmine

  1. afterAll(() => { … })
  2. afterEach(() => { … })
  3. beforeAll(() => { … })
  4. beforeEach(() => { … })
  5. describe(…, () => { … })
  6. describe('when …', () => { … })
  7. expect(…).toEqual(…)
  8. await expect(…).resolves.toEqual(…)
  9. it(…, () => { … })
  10. jest.mock(…)

jQuery

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

About

My snippets for Sublime Text 3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published