我发现在VS代码上安装Django 1.0.2扩展名会禁用默认的html.autoClosingTags,这意味着即使将其设置为True,也不会自动关闭HTML标签。
有人知道如何解决吗? 或者至少是另一种突出显示django语法的扩展,它不会禁用html.autoClosingTags。
如@Nadim Al Abdou所建议 在我的settings.json(文件>首选项>设置> settings.json)中:
Byte[,] image0 = new Byte[ySize,xSize]; // global input image
Byte[,] image1 = new Byte[ySize,xSize]; // global output image
private void AvFilter3x3_Click( object sender, RoutedEventArgs e )
{ Int32 sum, x, xx, xxx, y, yy, yyy;
for ( y=1; y < ySize-1; y++ ) //for each row except the first and last
{ for ( x=1; x < xSize-1; x++ ) //for each column except the first and last
{ sum = 0;
for ( yy=-1; yy <= 1; yy++ ) //upper, mid and lower indicees
{ yyy = y + yy;
for ( xx=-1; xx <= 1; xx++ )//left, mid and right indicees
{ xxx = x + xx;
sum += image0[yyy,xxx]; //add them up
} //====== end for (int xx... ================
} //======== end for (int yy... ================
image1[y,x] = Convert.ToByte( (float)sum/9f ); //divide by 9 and round
} //============ end for (int x... =====================
} //============== end for (int y... =====================
}
我把它变成:
var botAdapter = (BotFrameworkAdapter)stepContext.Context.Adapter;
TokenResponse result = await botAdapter.GetUserTokenAsync(stepContext.Context, connectionName, null, cancellationToken);
关闭并重新打开vs代码,但这不起作用。
这不起作用,因为我正在编辑用户设置
{
"python.pythonPath": "C:\\Applicazioni_Tommaso\\Anaconda3\\pythonw.exe",
"workbench.startupEditor": "newUntitledFile",
"workbench.colorTheme": "Atom One Dark",
"workbench.tree.indent": 30,
"terminal.integrated.cwd": "C:\\users\\tommaso",
"window.zoomLevel": 0,
"workbench.editor.enablePreview": false,
},
{
"python.pythonPath": "C:\\Applicazioni_Tommaso\\Anaconda3\\pythonw.exe",
"workbench.startupEditor": "newUntitledFile",
"workbench.colorTheme": "Atom One Dark",
"workbench.tree.indent": 30,
"terminal.integrated.cwd": "C:\\users\\tommaso",
"window.zoomLevel": 0,
"workbench.editor.enablePreview": false,
"files.associations": {
"**/*.html": "html",
"**/templates/**/*.html": "django-html",
"**/templates/**/*": "django-txt",
"**/requirements{/**,*}.{txt,in}": "pip-requirements"
},
"emmet.includeLanguages": {"django-html": "html"},
},
现在很明显,我应该编辑默认设置
>open settings
preferences: Open User Settings (JSON)
我实际上找到了>open settings
行的地方。
问题是我无法编辑文件,因为我尝试这样做,vscode显示消息:“无法在只读编辑器中进行编辑”。
我该怎么做插入行preferences: Open Default Settings (JSON)
?
答案 0 :(得分:1)
您需要像这样编辑全局settings.json文件
1。
"files.associations": {
"**/*.html": "html",
"**/templates/**/*.html": "django-html",
"**/templates/**/*": "django-txt",
"**/requirements{/**,*}.{txt,in}": "pip-requirements"
},
2。
"emmet.includeLanguages": {"django-html": "html"},
答案 1 :(得分:0)
我在一天之内创建了此扩展程序,我添加了更多功能,看到您正在添加:
"emmet.includeLanguages": { "django-html" : "html" }
我尝试添加它并且正在为我工作。老实说,我不确定为什么这对您不起作用,您解决了吗?
您可以尝试更新VSCode吗?此信息对我很有帮助。
另一种方法是在紧挨着之前:
"files.associations": {
谢谢
罗伯特。