OLD | NEW |
---|---|
(Empty) | |
1 # Use Visual Studio Code on Chromium code base | |
2 | |
3 [Visual Studio Code](http://code.visualstudio.com/) | |
4 ([Wikipedia](https://en.wikipedia.org/wiki/Visual_Studio_Code)) is a | |
5 multi-platform code editor that is itself based on Electron which base on | |
please use gerrit instead
2017/02/11 22:35:24
which base ---> which is based
| |
6 Chromium. Visual Studio Code has a growing community and base of installable | |
7 extensions and themes. I found it works pretty great without too much setup. | |
please use gerrit instead
2017/02/11 22:35:24
Please remove "I found" and "pretty great".
| |
8 | |
9 ## Install extensions | |
10 | |
11 `ctrl+p` paste `ext install cpptools you-complete-me` then enter. | |
12 Highly recommand you also install your favourite keymap. | |
please use gerrit instead
2017/02/11 22:35:24
"recommend" and "favorite" (Chromium code base use
| |
13 | |
14 ## Settings | |
15 | |
16 ``` | |
17 { | |
18 "editor.tabSize": 2, | |
19 "editor.rulers": [80], | |
20 // CPP | |
21 "C_Cpp.clang_format_path": "<your_depot_tools_path>/clang-format", | |
22 "C_Cpp.clang_format_fallbackStyle": "Chromium", | |
23 // Exclude | |
24 "files.exclude": { | |
25 "**/.git": true, | |
26 "**/.svn": true, | |
27 "**/.hg": true, | |
28 "**/.DS_Store": true, | |
29 "**/out": true | |
30 }, | |
31 // YCM | |
32 "ycmd.path": "<your_ycmd_path>", | |
33 "ycmd.global_extra_config": | |
34 "<your_chromium_path>/src/tools/vim/chromium.ycm_extra_conf.py", | |
35 "ycmd.confirm_extra_conf": false, | |
36 "ycmd.use_imprecise_get_type": true | |
37 } | |
38 ``` | |
please use gerrit instead
2017/02/11 22:35:24
Where can settings be edited?
| |
39 | |
40 ### Install auto-completion engine(ycmd) | |
41 | |
42 ``` | |
43 $ git clone https://github.com/Valloric/ycmd.git ~/.ycmd | |
44 $ cd ~/.ycmd | |
45 $ ./build.py --clang-completer | |
46 ``` | |
47 | |
48 ## Work flow | |
49 | |
50 1. `ctrl+p` open file. | |
51 2. `ctrl+shift+o` goto symbol. `ctrl+l` goto line. | |
52 3. <code>ctrl+`</code> toggle terminal. | |
53 | |
54 ## Tips | |
55 | |
56 ### On laptop | |
57 | |
58 Because we use ycmd to enable auto completion. we can disable CPP autocomplete | |
59 to save battery. `"C_Cpp.autocomplete": "Disabled"` | |
60 | |
61 ### More | |
62 | |
63 https://github.com/Microsoft/vscode-tips-and-tricks/blob/master/README.md | |
OLD | NEW |