-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "mq-j", | ||
"intelliSenseMode": "${default}", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/src", | ||
"${workspaceFolder}/include", | ||
"${workspaceFolder}/libc", | ||
"${workspaceFolder}/build/mq-j/include" | ||
], | ||
"defines": ["VERSION=MQ_J"] | ||
}, | ||
{ | ||
"name": "mq-u", | ||
"intelliSenseMode": "${default}", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/src", | ||
"${workspaceFolder}/include", | ||
"${workspaceFolder}/libc", | ||
"${workspaceFolder}/build/mq-u/include" | ||
], | ||
"defines": ["VERSION=MQ_U"] | ||
}, | ||
{ | ||
"name": "mq-e", | ||
"intelliSenseMode": "${default}", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/src", | ||
"${workspaceFolder}/include", | ||
"${workspaceFolder}/libc", | ||
"${workspaceFolder}/build/mq-e/include" | ||
], | ||
"defines": ["VERSION=MQ_E"] | ||
}, | ||
{ | ||
"name": "ce-j", | ||
"intelliSenseMode": "${default}", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/src", | ||
"${workspaceFolder}/include", | ||
"${workspaceFolder}/libc", | ||
"${workspaceFolder}/build/ce-j/include" | ||
], | ||
"defines": ["VERSION=CE_J"] | ||
}, | ||
{ | ||
"name": "ce-u", | ||
"intelliSenseMode": "${default}", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/src", | ||
"${workspaceFolder}/include", | ||
"${workspaceFolder}/libc", | ||
"${workspaceFolder}/build/ce-u/include" | ||
], | ||
"defines": ["VERSION=CE_U"] | ||
}, | ||
{ | ||
"name": "ce-e", | ||
"intelliSenseMode": "${default}", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/src", | ||
"${workspaceFolder}/include", | ||
"${workspaceFolder}/libc", | ||
"${workspaceFolder}/build/ce-e/include" | ||
], | ||
"defines": ["VERSION=CE_E"] | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# VSCode | ||
|
||
A lot of people on this project use VSCode as their coding environment. | ||
|
||
## Extensions | ||
|
||
There are a number of useful extensions available to make work more efficient: | ||
|
||
- C/C++ IntelliSense | ||
- Clang-Format | ||
- HexInspector (hover on numbers for float and other info) | ||
- NumberMonger (convert hex to decimal and vice versa) | ||
|
||
## Useful keyboard shortcuts | ||
|
||
- Ctrl + Alt + Up/Down (on Windows, on Linux it's Ctrl + Shift + Up/Down or Shift + Alt + Up/Down) gives multicursors across consecutive lines. If you want several cursors in a more diverse arrangement, middle clicking works, at least on Windows. | ||
- Alt + Up/Down moves lines up/down. | ||
- Shift + Alt + Up/Down (Linux: Ctrl + Shift + Alt + Up/Down) copies lines up/down. | ||
- Ctrl + P offers a box to use to search for and open files. | ||
- Ctrl + Shift + P offers a box for commands like editing settings or reloading the window. | ||
|
||
- Make use of VSCode's search/search-and-replace features. | ||
- Ctrl + Click goes to a definition. | ||
- Ctrl + F for search in current file | ||
- Ctrl + H for replace in current file | ||
- Ctrl + Shift + F for search in all files | ||
- Ctrl + Shift + H for replace in all files | ||
- F2 for Rename symbol | ||
|
||
Many of VS Code's other shortcuts can be found on [its getting started page](https://code.visualstudio.com/docs/getstarted/keybindings), which also has links to OS-specific PDFs. | ||
|
||
## C/C++ configuration | ||
|
||
You can create a `.vscode/c_cpp_properties.json` file with `C/C++: Edit Configurations (JSON)` in the command box to customise how IntelliSense reads the repository (stuff like where to look for includes, flags, compiler defines, etc.) to make VSCode's IntelliSense plugin better able to understand the structure of the repository. | ||
|
||
Below is a good default one to use for this project's repository, for the `ce-j` version specifically. | ||
|
||
A more complete `c_cpp_properties.json` with configurations for all supported versions [can be found here](c_cpp_properties.json). | ||
|
||
```jsonc | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "ce-j", | ||
"intelliSenseMode": "${default}", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/src", | ||
"${workspaceFolder}/include", | ||
"${workspaceFolder}/libc", | ||
"${workspaceFolder}/build/ce-j/include" | ||
], | ||
"defines": ["VERSION=CE_J"] | ||
} | ||
], | ||
"version": 4 | ||
} | ||
``` |