Skip to content

IceyWu/Lean-Snippet

Repository files navigation


Lean Snippet

Extensions for Visual Studio Code

Visual Studio Marketplace Version

download ๐Ÿš€

English | ไธญๆ–‡


Using ๐ŸŒˆ

KeyBoard Shortcuts ๐ŸŒˆ

Cmd+Shift+/

console.log selected text

console.log('๐ŸŒณresult------------------------------>');

Cmd+Shift+L

console.log selected text and val

console.log('๐Ÿง-----text-----', val);

Cmd+Shift+D

It will delete all console.log statements in the current document

Usage๐ŸŒˆ

Prefix JavaScript Snippet Content
lre ๐ŸŒˆapi requset demo
lcl ๐ŸŒˆconsole.log('๐ŸŒˆ-----xxx-----',xxx) // xxx
laf ๐ŸŒˆconst func = () => {}
lif ๐ŸŒˆif(){ ... } else{...}
lsw ๐ŸŒˆswitch(){ case: break; default: break;}
lcc ๐ŸŒˆ/** * @func fnName */

Prefix Vue Snippet Content
lvc ๐ŸŒˆvue3 component template
lvb ๐ŸŒˆ vue base template
lref ๐ŸŒˆ const valName = ref(..)
lrea ๐ŸŒˆ const valName = reactive(..)
lcom ๐ŸŒˆ const valName = computed(..)
lwa ๐ŸŒˆ watch(..)
lwe ๐ŸŒˆ watchEffect(..)
lmo ๐ŸŒˆ onMounted(..)
lbm ๐ŸŒˆ onBeforeMount(..)
lbu ๐ŸŒˆ onBeforeUnmount(..)
lun ๐ŸŒˆ onUnmounted(..)
lvem ๐ŸŒˆ const emit = defineEmits([]);
lvpr ๐ŸŒˆ const props = defineProps({});
lvde ๐ŸŒˆ defineExpose({});

Prefix Vue Snippet html
lrem ๐ŸŒˆlorem of English
lremc ๐ŸŒˆlorem of Chinese
lremn ๐ŸŒˆlorem of num

Shortcut tool for VS Code

With the rapid development and iteration of tools, the testing requirements that need to be addressed are also increasing, with a large number of calls and nesting appearing in the code The probability of collapse is also increasing. In order to solve these problems and reduce repetitive work, we have encapsulated these functions and code blocks in a fast and efficient manner, optimizing the code size and development efficiency, and greatly improving the readability and comprehensibility of the code.

This article introduces a shortcut writing method based on Lean Snippet, which allows us to write in a synchronous manner for rapid development.

Enjoy it to the fullest

License

MIT License ยฉ 2023-PRESENT Icey Wu

About

Generate useful snippets!๐ŸŒˆ

Resources

License

Stars

Watchers

Forks

Packages

No packages published