Index: docs/vscode.md |
diff --git a/docs/vscode.md b/docs/vscode.md |
new file mode 100644 |
index 0000000000000000000000000000000000000000..53e938fe68eb78ccac27d884fbc6f94b6f6db872 |
--- /dev/null |
+++ b/docs/vscode.md |
@@ -0,0 +1,63 @@ |
+# Use Visual Studio Code on Chromium code base |
+ |
+[Visual Studio Code](http://code.visualstudio.com/) |
+([Wikipedia](https://en.wikipedia.org/wiki/Visual_Studio_Code)) is a |
+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
|
+Chromium. Visual Studio Code has a growing community and base of installable |
+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".
|
+ |
+## Install extensions |
+ |
+`ctrl+p` paste `ext install cpptools you-complete-me` then enter. |
+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
|
+ |
+## Settings |
+ |
+``` |
+{ |
+ "editor.tabSize": 2, |
+ "editor.rulers": [80], |
+ // CPP |
+ "C_Cpp.clang_format_path": "<your_depot_tools_path>/clang-format", |
+ "C_Cpp.clang_format_fallbackStyle": "Chromium", |
+ // Exclude |
+ "files.exclude": { |
+ "**/.git": true, |
+ "**/.svn": true, |
+ "**/.hg": true, |
+ "**/.DS_Store": true, |
+ "**/out": true |
+ }, |
+ // YCM |
+ "ycmd.path": "<your_ycmd_path>", |
+ "ycmd.global_extra_config": |
+ "<your_chromium_path>/src/tools/vim/chromium.ycm_extra_conf.py", |
+ "ycmd.confirm_extra_conf": false, |
+ "ycmd.use_imprecise_get_type": true |
+} |
+``` |
please use gerrit instead
2017/02/11 22:35:24
Where can settings be edited?
|
+ |
+### Install auto-completion engine(ycmd) |
+ |
+``` |
+$ git clone https://github.com/Valloric/ycmd.git ~/.ycmd |
+$ cd ~/.ycmd |
+$ ./build.py --clang-completer |
+``` |
+ |
+## Work flow |
+ |
+1. `ctrl+p` open file. |
+2. `ctrl+shift+o` goto symbol. `ctrl+l` goto line. |
+3. <code>ctrl+`</code> toggle terminal. |
+ |
+## Tips |
+ |
+### On laptop |
+ |
+Because we use ycmd to enable auto completion. we can disable CPP autocomplete |
+to save battery. `"C_Cpp.autocomplete": "Disabled"` |
+ |
+### More |
+ |
+https://github.com/Microsoft/vscode-tips-and-tricks/blob/master/README.md |