Skip to content
Advertisement

Tag: visual-studio-code

Vscode move line above a block shortcut key

Is there any shortcut key to move a line above or below a block? This feature exists in IntelliJ editors and maybe also in visual studio. You can use Alt+Up to move a line up one line. Is there any such shortcut key to move the line above an entire block above? In the example below, it’s to move the

How do I delete all unused imports in the active file with one command in VS Code (typescript)?

Previously, I used to be able to do CMD+SHIFT+p > Organize imports and this would both sort and delete unused imports. This functionality seems to have broken. How can I delete unused imports quickly with one command? Current workaround is: click on unused import, CMD+. > Delete unused imports. Languages for which this is applicable (typescript, typescriptreact, javascript, javascriptreact). I

Execute function in vscode snippet

Is it possible to run a function during expansion of snippet? javascript.json – vscode snippet file: index.js – project file: The obvious reason might be snippet is a json file, it’s not a javascript file so it can’t run code, just show syntax as it with cursor positions $1, $2 etc. Or is it possible through a vscode plugin? Answer

Advertisement