英文:
Why my vscode is not showing indent while I press enter in brackets
问题
I don't know the reason but my vscode is not working properly because whenever I press enter in bracket it automatically adds indent and this beautifies the code, but I don't know why it's stopped now.
Expected:
if(--------) {
Statement 1
}
Actual:
if(------) {
Statement 1}
Editor: Indent-auto detailed screenshot
Editor: Intent-auto screenshot
英文:
I don't know the reason but my vscode is not working properly
because whenever i press enter in bracket it automatically add indent and this beautifies the code but i don't know why it's stopped now
Expected
if(--------) {
Statement 1
}
Actual
if(------) {
Statement 1}
答案1
得分: -1
你一定搞乱了设置
有两件事你应该尝试做
尝试检查缩进设置
通过按下 Ctrl + , 打开你的 VSCode 设置
搜索 "Auto Indent"。
确保选项 <Editor:Auto Indent> 已启用。
如果你是初学者,尝试将 VS Code 设置为默认首选项
通过按下 Ctrl + Shift + P 打开命令面板
进入 "首选项"
单击三个点,然后选择 "重置为默认值"。
英文:
You must have messed up the settings
There are two things you shud try doing
Try checking the indentation settings
> Open your VSCode settings by pressing Ctrl + ,
> Search for "Auto Indent".
> Make sure the option for <Editor:Auto Indent> is enabled.
If you are beginner try setting the vs code settings to default preferences
> Open the Command Palette by pressing Ctrl + Shift + P
> Go to "Preferences
> Click the three dots and choose "Reset to Defaults"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论