VS Code tips —Using the current filename in snippets

preview_player
Показать описание
Today's VS Code tip: $TM_FILENAME

Use $TM_FILENAME in snippets to insert the current file's name. Use $TM_LINE_NUMBER for the current line number

VS Code includes many additional snippet vars. You can use them with snippet transforms too!

Рекомендации по теме
Комментарии
Автор

Hello
It is possible to 'online' convert letter to upper case. What i mean:
i create snippet "const [$1, set$1] = useState()"
Then, when i used it i get const [CURSOR, setCURSOR] = useState(), when i typing 'height' i get const [height, setheight] = useState()
I want to replace the first letter of 'height' to upper case for const [height, setHeight] = useState()
Thanks

МаксимЛибер-фн
Автор

If you don't want the extension, it is $TM_FILENAME_BASE.

morgard
visit shbcf.ru