Visual Studio Code
This article introduces some useful configurations of Visual Studio Code.
Enable Command Center
Right click on Menu Bar
and select Command Center
to enable it:
Open User Settings (JSON)
Press Ctrl + Shift + P
, then input Open User Settings (JSON)
, and open the JSON settings:
Export / Import Settings Profiles
In Command Center
, input > export
and select Settings Profiles: Export...
to export current settings to specified file:
In Command Center
, input > import
and select Settings Profiles: Import...
to import settings from specified file:
Show Line Numbers in Search Results
Select Settings > Search > Show Line Numbers
:
Disable Error Squiggles
Set Settings > C/C++ > C_Cpp: Error Squiggles
to Disabled
:
Search
Use Show Search Modes...
in right side of Command Center
:
to:
Options | Comments |
---|---|
... Go to File |
Search specified file |
: Go to Line/Column |
Go to specified line in current file |
@ Go to Symbol in Editor |
Search specified symbol in current file |
# Go to Symbol in Workspace |
Search specified symbol in workspace |
Search in current file:
Ctrl + F
, then input keywords- Select keywords in current file, then
Ctrl + F
Search in workspace:
Ctrl + Shift + F
, then input keywords- Select keywords in current file, then
Ctrl + Shift + F
- Select keywords in current file, then select
Find All References
in right-click menu
Seach: Exclude
VSCode Remote-SSH
VSCode Remote-SSH from Windows to Linux Server:
1st, generate id_isa_<XXX>
and id_isa_<XXX>.pub
on Windows by executing the following commands in MobaXterm:
ssh-keygen -t rsa
2nd, copy the files id_isa_<XXX>
and id_isa_<XXX>.pub
to the folder C:\User\<Your-Account-on-Windows>\.ssh\
on Windows.
3rd, change properties of the file id_isa_<XXX>
on Windows. That’s, keep your accout only in Group or user names
field:
4th, copy content of the file id_isa_<XXX>.pub
from Windows to the file /home/<Your-Account-on-Linux-Server>/.ssh/authorized_keys
on Linux server.
5th, install VSCode extension Remote-SSH
on Windows.
6th, add VSCode SSH configuration file C:\User\<Your-Account-on-Windows>\.ssh\config
on Windows:
Host <Linux-Server-Name>
HostName <Linux-Server-IP>
User <Your-Account-on-Linux-Server>
PreferredAuthentications publickey
IdentityFile "C:\User\<Your-Account-on-Windows>\.ssh\id_rsa_XXX"
7th, to move the folder remote.SSH.serverInstallPath
on a larger disk on Linux server, set it in VSCode settings remote.SSH.serverInstallPath
on Windows:
8th, it is no need to input password anymore when VSCode on Windows connecting to the Linux server.
Open Editors: Sort Order
Remote-explorer: Folder Sort Order
Symbol order in Breadcrumbs
Fix Ctrl+Shift+F not work issue
与微软拼音输入法的简繁切换快捷键冲突,取消微软拼音输入法的简繁切换快捷键即可:
Win键 > 设置 > 时间和语言 > 语言 > 首选语言: 中文 > 选项 > 键盘: 微软拼音 > 选项 > 按键 > 快捷键: 简体/繁体中文输入切换
Fix Go to Definition not work issue
Install extension C/C++ to SSH remote:
Then, the Go to Definition can be used:
Turn on Rulers
Upload and download files
Window: Title
Terminal: Hide Tabs
Terminal: Right Click Behavior
1st. Press ctrl+,
2nd. Search right click
3rd. Set Right Click Behavior
to default
Explorer: Disable Auto Reveal
Disable Auto Reveal on Explorer:
You can reveal the opened file in Explorer View by:
Trim Tailing Whitespace
Bracket Pairs
Workspace
Add Folder to Workspace…
Save Workspace As…
Extensions
- C/C++
- Remote Development
- GitLens
- PlantUML
GitLens
SOURCE CONTROL
COMMIT
Open View Settings:
User author avatars:
Abbreviated Sha Length: