If I had a typescript file idented by 4 spaces with some SQL strings idented with 2 spaces.
function ts_query(){
const sql=`
SELECT *
FROM table1
WHERE field1 IS NULL
AND field2 IS NOT NULL
`;
return sql;
}
function other(x:string){
if(x=="this"){
return "that";
}
}
When I select the SQL part and press tab the conent is reidented
In the picture you can see that Visual Code is not respecting my original ident of that code section.
Is there a way to configure VisualStudioCode to do the same that Notepad++ does (i.e.: respecting the original format simply adding 4 spaces).
My settings.json is:
{
"workbench.colorTheme": "Default Light+",
"git.autofetch": true,
"window.zoomLevel": 0,
"extensions.ignoreRecommendations": false,
"git.enableSmartCommit": false,
"git.promptToSaveFilesBeforeCommit": true,
"window.titleBarStyle": "custom",
"breadcrumbs.enabled": true,
"editor.autoIndent": false
}
I am using Visual Studio Code v1.28.2 in Windows 8.1
"editor.tabSize": 4
2. enable"editor.detectIndentation": true
3. enable"editor.autoIndent": true
.