Lean Snippet

March 27, 2026 · View on GitHub

Code snippet manager & log toolkit for VS Code.

VS Code Marketplace

English | 中文

Features

  • Snippet management — browse, add, import/export snippets from the sidebar
  • Multi-language — JS, TS, Vue, HTML built-in; supports custom languages
  • Log tools — insert named console.log, bulk delete all logs
  • Keybinding editor — view and customize shortcuts in the panel

demo

Keyboard Shortcuts

ShortcutAction
Ctrl+Shift+LInsert log with selected variable
Ctrl+Shift+/Choose log type to insert
Ctrl+Shift+DDelete all log statements in file

Mac: replace Ctrl with Cmd. All shortcuts are customizable in the panel.

Log Examples

// Select `text`, press Ctrl+Shift+L →
console.log("🍧-----text-----", text);

// Press Ctrl+Shift+D → all console.log removed

Snippet Reference

JavaScript / TypeScript

PrefixDescription
lreAsync request pattern
lretRequest with try-catch
lclconsole.log with variable
lafArrow function
lifIf-else
lswSwitch-case
lccJSDoc comment
linterfaceTS interface
ltypeTS type alias
ltsfuncTS function
lclassTS class
lenumTS enum
ltrycatchTry-catch block

Vue 3

PrefixDescription
lvcComponent template
lvbBase template
lrefref()
lreareactive()
lcomcomputed()
lwa / lwewatch / watchEffect
lmo / lunonMounted / onUnmounted
lvem / lvpr / lvdedefineEmits / defineProps / defineExpose

HTML

PrefixDescription
lremEnglish placeholder text
lremcChinese placeholder text
lremnNumeric placeholder text

Install

  1. Search Lean Snippet in the VS Code Extensions panel
  2. Or install from Marketplace

License

MIT © 2023-PRESENT Icey Wu