Snippets ✂️
How to create a VSCode snippet
back to blog
Buymeacoffee
Bluesky
Discord
GitHub
LinkedIn
Mastodon
Steam
Interact with snippet
base
editorconfig
EditorConfig
git
license
MIT License
lua
VimDebug
metaTableAdd
metaTableExport
sh
DisableShellCheck
js
js
import
importNoModuleName
importDestructing
importEverything
importAs
consoleAssert
consoleClear
consoleCount
consoleDir
consoleError
consoleGroup
consoleGroupEnd
consoleLog
consoleTrace
consoleLogObject
consoleLogJson
consoleTime
consoleTimeEnd
consoleWarn
consoleInfo
consoleTable
mui
next-js
Nextjs app router root layout
Nextjs app router layout
Nextjs app router page
Nextjs app router loading
Nextjs app router error
Nextjs app router global error
Nextjs app router template
Nextjs page with server side props
Nextjs page with static side props and static side paths
Nextjs Custom 404 page
Nextjs Custom 500 page
Nextjs getServerSideProps()
Nextjs getStaticProps()
Nextjs getStaticPaths()
Nextjs use link
Nextjs arrow function export at the end
Nextjs arrow function
Nextjs normal function with export at the end
Nextjs normal function
Nextjs getServerSideProps
Nextjs getStaticProps
Nextjs getStaticPaths
Nextjs getInitialProps
Nextjs custom app (_app.js)
Nextjs Custom Document (_document.js)
Nextjs route handler get request
Nextjs route handler post request
Nextjs route handler put request
Nextjs route handler patch request
Nextjs route handler delete request
Nextjs Api route
Nextjs arrow function (export at the end) with getServerSideProps
Nextjs normal function(export at the end) with getServerSideProps
Nextjs arrow function with getStaticProps
Nextjs normal function(export at the end) with getStaticProps
Nextjs static generation
Nextjs import for Link component
Nextjs import for Router(default) component
Nextjs import for useRouter component
Nextjs import for Head component
Nextjs import for Image component
Nextjs import for Dynamic
Nextjs link component defination with href
Nextjs useRouter component defination
Nextjs Head component defination
Nextjs Image component defination
Nextjs Dynamic Import defination
Nextjs Dynamic Import defination with named exports
next-ts
Nextjs app router root layout
Nextjs app router layout
Nextjs app router page
Nextjs app router loading
Nextjs app router error
Nextjs app router global error
Nextjs app router template
Nextjs page with server side props
Nextjs page with static side props and static side paths
Nextjs Custom 404 page
Nextjs Custom 500 page
Nextjs getServerSideProps()
Nextjs getStaticProps()
Nextjs getStaticPaths()
Nextjs use link
Nextjs arrow function export at the end
Nextjs arrow function
Nextjs normal function with export at the end
Nextjs normal function
Nextjs getServerSideProps
Nextjs getStaticProps
Nextjs getStaticPaths
Nextjs getInitialProps
Nextjs typescript arrow function with getServerSideProps(DEPRECATED)
Nextjs typescript arrow function with getServerSideProps
Nextjs typescript arrow function with getStaticProps(DEPRECATED)
Nextjs typescript arrow function with getStaticProps
Nextjs static generation(DEPRECATED)
Nextjs static generation
Nextjs import for Link component
Nextjs import for Router(default) component
Nextjs import for useRouter component
Nextjs import for Head component
Nextjs import for Image component
Nextjs import for Dynamic
Nextjs link component defination with href
Nextjs useRouter component defination
Nextjs Head component defination
Nextjs Image component defination
Nextjs Dynamic Import defination
Nextjs Dynamic Import defination with named exports
Nextjs route handler get request
Nextjs route handler post request
Nextjs route handler put request
Nextjs route handler patch request
Nextjs route handler delete request
Nextjs Api route (DEPRECATED)
Nextjs Api route
Nextjs typescript custom app (_app.js)(DEPRECATED)
Nextjs typescript custom app (_app.js)
Nextjs typescript Custom Document (_document.js)(DEPRECATED)
Nextjs typescript Custom Document (_document.js)
react
exportType
exportInterface
typescriptReactClassComponent
typescriptReactClassExportComponent
typescriptReactFunctionalExportComponent
typescriptReactFunctionalComponent
typescriptReactArrowFunctionExportComponent
typescriptReactArrowFunctionComponent
typescriptReactClassPureComponent
typescriptReactClassExportPureComponent
typescriptReactClassComponentRedux
typescriptReactNativeArrowFunctionComponent
typescriptReactNativeArrowFunctionComponentWithStyles
reactArrowFunctionComponent
reactArrowFunctionComponentWithPropTypes
reactArrowFunctionExportComponent
reactClassComponent
reactClassComponentPropTypes
reactClassComponentRedux
reactClassComponentReduxPropTypes
reactClassExportComponent
reactClassExportComponentWithPropTypes
reactClassExportPureComponent
reactClassPureComponent
reactClassPureComponentWithPropTypes
reactFunctionMemoComponent
reactFunctionMemoComponentWithPropTypes
reactFunctionalComponent
reactFunctionalComponentRedux
reactFunctionalComponentReduxPropTypes
reactFunctionalComponentWithPropTypes
reactFunctionalExportComponent
useCallback
useContext
useEffect
useImperativeHandle
useLayoutEffect
useMemo
useReducer
useRef
useState
importAs
importBrowserRouter
importBrowserRouterWithRouteAndNavLink
importDestructing
importEverything
importNoModuleName
importPropTypes
importReact
importReactDom
importReactWithComponent
importReactWithComponentAndPropTypes
importReactWithMemo
importReactWithMemoAndPropTypes
importReactWithPureComponent
importReactWithPureComponentAndPropTypes
importRouterLink
importRouterNavLink
importRouterSetup
importRouterSwitch
import
propTypeArray
propTypeArrayRequired
propTypeBool
propTypeBoolRequired
propTypeFunc
propTypeFuncRequired
propTypeNumber
propTypeNumberRequired
propTypeObject
propTypeObjectRequired
propTypeString
propTypeStringRequired
propTypeNode
propTypeNodeRequired
propTypeElement
propTypeElementRequired
propTypeInstanceOf
propTypeInstanceOfRequired
propTypeEnum
propTypeEnumRequired
propTypeOneOfType
propTypeOneOfTypeRequired
propTypeArrayOf
propTypeArrayOfRequired
propTypeObjectOf
propTypeObjectOfRequired
propTypeShape
propTypeShapeRequired
propTypeExact
propTypeExactRequired
propTypeAny
reactNativeComponent
reactNativeComponentExport
reactNativeComponentWithStyles
reactNativeFunctionalComponent
reactNativeFunctionalComponentWithStyles
reactNativeFunctionalExportComponent
reactNativeFunctionalExportComponentWithStyles
reactNativeImport
reactNativePureComponent
reactNativePureComponentExport
reactNativeStyles
importReduxConnect
reduxAction
reduxConst
reduxReducer
reduxSelector
reduxSlice
mappingToProps
describeBlock
itAsyncBlock
itBlock
setupReactComponentTestWithRedux
setupReactNativeTest
setupReactNativeTestWithRedux
setupReactTest
testAsyncBlock
testBlock
exportDefault
exportDestructing
exportAs
exportNamedFunction
exportDefaultFunction
exportDefaultNamedFunction
method
propertyGet
propertySet
forEach
forOf
forIn
anonymousFunction
namedFunction
destructingObject
destructingArray
setInterval
setTimeOut
promise
destructProps
destructState
classConstructor
emptyState
componentDidMount
shouldComponentUpdate
componentDidUpdate
componentWillUnmount
getDerivedStateFromProps
getSnapshotBeforeUpdate
createContext
createRef
componentSetStateObject
componentSetStateFunc
componentProps
componentState
bindThis
commentBigBlock
hocComponentWithRedux
hocComponent
typeofSnippet
react-testing-library
screen.debug
screen.log.testing-playground
import.testing-library
import.testing-library.react
import.testing-library.vue
import.testing-library.render-hook
import.testing-library.user-event
query.role
query.role.options
query.role.options.name
query.role.checkbox
query.role.checkbox.checked
query.role.heading
query.role.heading.level
query.label
query.label.full
query.label.substring
query.label.query
query.label.substring+query
query.text
query.text.full
query.text.ignore
query.text.substring
query.text.substring+ignore
query.text.startWith
query.text.element.startWith
query.text.endWith
query.text.element.endWith
query.placeholder
query.placeholder.full
query.placeholder.substring
query.displayValue
query.displayValue.full
query.displayValue.substring
query.altText
query.altText.full
query.altText.substring
query.Title
query.Title.full
query.Title.substring
query.TestId
query.TestId.full
query.TestId.substring
regex.full
regex.full+ignore
regex.substring
regex.substring+ignore
regex.start
regex.start+ignore
regex.end
regex.end+ignore
userEvent.setup
userEvent.beforeEach
userEvent.click
userEvent.dblClick
userEvent.type
userEvent.type+submit
userEvent.clear
userEvent.selectOptions
userEvent.deselectOptions
userEvent.tab
userEvent.hover
userEvent.unhover
userEvent.paste
wait.for
wait.for.removed
vitest
toBe
toBeCloseTo
toBeDefined
toBeFalsy
toBeGreaterThan
toBeGreaterThanOrEqual
toBeInTheDocument
toBeInstanceOf
toBeLessThan
toBeLessThanOrEqual
toBeNull
toBeTruthy
toBeUndefined
toContain
toContainEqual
toEqual
toHaveBeenCalled
toHaveBeenCalledTimes
toHaveBeenCalledWith
toHaveBeenLastCalledWith
toHaveLength
toHaveProperty
toHavePropertyDisabled
toHavePropertySelected
toMatch
toMatchInlineSnapshot
toMatchObject
toMatchSnapshot
toStrictEqual
toThrow
toThrowError
toThrowErrorMatchingInlineSnapshot
toThrowErrorMatchingSnapshot
describe
describe.only
describe.skip
expect
expect.assertions
expect.hasAssertions
expect.rejects
expect.resolves
import.vitest
import.vitest.extra
it
it.only
it.skip
it.todo
it:async
vi.afterEach.mockClearReset
vi.mock
vi.mock.mockResolvedValue
vi.fn
vi.fn.mockResolvedValue
const.fn
const.fn.mockResolvedValue
mock.mockReturnValue
mock.mockReturnValueOnce
vi.spyOn
vi.spyOn.mockImplementation
const.spyOn
const.spyOn.mockImplementation
afterAll
afterEach
beforeEach
beforeEach:async
beforeAll
beforeAll:async
test
test.only
test.skip
test.todo
test:async
expect.any.type
expect.any.string
expect.any.number
expect.any.boolean
expect.any.date
expect.any.function
expect.any.array
expect.any.thing
rust
rust
Basic Function
Basic Struct
Basic Enum
Match Statement
Error Handling
If Statement
For Loop
While Loop
Function with Lifetime
Immutable Variable
Mutable Variable
Vector Initialization
HashMap Initialization
Tuple Initialization
Basic Array
Basic Macro
Struct Method
Enum Method
Trait Definition
Implement Trait
Using Crate
Doc Comment
Unit Test
Benchmark Test
Async Function
Await Expression
Option Handling
Result Handling
Vec Push
Vec Iterate
Basic Closure
Basic Iterator
Trait Method Call
Basic Assert
Basic Debug Print
Basic Print
Basic Debug Print with Formatting
File Reading
File Writing
Basic HTTP Request
Basic Mutex
Basic Arc
Basic Channel
Basic RefCell
Basic Option Unwrap
Basic Result Unwrap
Basic Box
Basic Deref
Basic Drop
Basic Deserialize JSON
Basic Serialize to JSON
Basic HTTP Server
Basic Environment Variable Access
Basic RefCell Borrowing
Basic Rc Usage
Basic Deref with Rc
Basic Thread Join
Basic Mutex Locking
Basic Arc with Mutex
Basic Json Parsing with Serde
Basic Unit Testing
Basic Thread Spawning
Basic Match Statement
Basic Iteration over Vector
Basic Iteration over HashMap
Basic Struct Implementation
Basic Enum Implementation
Basic Lifetime Annotation
Basic Unsafe Block
Basic Clone
Basic Iterator Adapter
Basic Error Handling
Result to Option Conversion
Option to Result Conversion
Propagate Error with ? Operator
Error Handling with Custom Error Type
Error Handling with Closure
Error Handling with If Let
Match with Error Handling and Return
Unwrap with Default Value
Handle Result with Match and Logging
Handle Multiple Errors
Early Return on Error
Error Handling with Optional Chaining
Handle Error with Result and Logging
Handle Error with Default Value
Custom Error with Context
Error Handling with Result and Optional Chaining
Handle Error in Async Context
Error Handling with Match and Option
Error Handling with Result and Option Chaining
Handle Error with Result and Option Chaining
Error Handling with Result and Default Value
Error Handling with Match and Return
Error Handling in Async Context
Handling Error with Option and Result
Handling Result with Error and Default Value
Error Handling with If Let and Result
Error Handling with Custom Error Type and Result
Error Handling with Option and Result Chaining
Error Handling with Option and Default Value
Error Handling with Result and Match
Error Handling with Result and Closure
Struct Definition
Enum Definition
Theme
catppuccin-frappe
catppuccin-latte
catppuccin-macchiato
catppuccin-mocha
Enable Vim