Location of VS Code preferences

六眼飞鱼酱① 提交于 2020-12-29 04:31:47

问题


My cat jumped onto my keyboard while I was coding in Dart using VS Code. The result was an enormous increase in font size for both the editor and the sidebar. To no avail I tried Ctrl -. I was unable to access settings because the large font size made navigating in settings impossible.

In despair, I uninstalled VS Code, Flutter, and Dart. Using an administrator account (Win 7) I downloaded all three and reinstalled. I opened VS Code and found that the font size was restored. But when I switched user to my normal standard user account and opened VS Code, the font size was as it was before I reinstalled the software. This leads me to the belief that either a preferences file or registry entries had preserved my settings on a user-by-user basis. But where are these settings actually stored.

I do not normally use administrator privileges. They are reserved for system wide operations. It was only serendipitous that I found the two settings.

Thanks,


回答1:


According to Microsoft Docs: Settings file locations:

By default VS Code shows the Settings editor, but you can still edit the underlying settings.json file by using the Open Settings (JSON) command or by changing your default settings editor with the workbench.settings.editor setting.

Depending on your platform, the user settings file is located here:

  • Windows %APPDATA%\Code\User\settings.json
  • macOS $HOME/Library/Application Support/Code/User/settings.json
  • Linux $HOME/.config/Code/User/settings.json

The workspace setting file is located under the .vscode folder in your root folder.

Note: In case of a Multi-root Workspace, workspace settings are located inside the workspace configuration file.

According to Microsoft Docs: Persisted Zoom Level the entry you are looking for is: window.zoomLevel



来源:https://stackoverflow.com/questions/53840644/location-of-vs-code-preferences

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!