vscode - RicoJia/notes GitHub Wiki
========================================================================
========================================================================
-
hotkeys
- Navigation
-
c+~
to open terminal -
ctrl+enter
to open file in vertical split -
c+s+x
see extensions -
ctrl+shift+-
for previous cursor position.ctrl+alt+-
for next cursor position
-
-
c+,
for settings-
c+s+p
for settings.json
-
-
ctrl + o
, open file-
ctrl + k + o
opens folder
-
- see installations,
<F1>
- debug
- f9 - breakpoint
- f5 start debugging
-
c+`
to toggle console -
c+s+`
for new terminal
- c+f, local string search
- c+s+f, cross file search
-
alt+f
all search
-
c-s-e
is emoji.- go to
sudo ibus-setup
(without sudo you will see import error of gi)
- go to
- Navigation
-
Plugins
-
markdown all in one
- https://github.com/yzhang-gh/vscode-markdown#keyboard-shortcuts-1
- Note: I changed italic toggle
c+i
to code...- You can still use
c+b
for bold
- You can still use
- Note: changed strikethrough toggle to
ctrl+s
- python review
- c+k v, see code
-
tabine
- diabled "" autocomplete so autodocstring can work properly
-
AREPL: click on tab to see it
-
github copilot
-
autodocstring
-
relative go-to
- when in doubt, check out ~/.vscode
-
alt+s
for select,alt+g
with +/- numbers
-
Arepl
from arepl_dump import dump dump()
-
vsnips
- Currently we cannot add snippets to vsnips. Check out https://www.youtube.com/watch?v=yjNDBk9cP38 instead to add snippets to vscode
- disabled
-
gitlens
- see commit, diff
<F1>-git all changes
<F1> file history
- gitlens arrow icon, click multiple times
- make commit quickly
<F1> -> git commit
- undo a commit: gitlens
- open file remotely; open pr
- Without any changes to
git remote
, doremotes->globe icon
- Else, do
gitlens -> remote -> +
- Without any changes to
- see commit, diff
-
vscode-vim: insertion mode works
- ->
<c-w>
- disable
"vim.handleKeys": { "<C-x>": false, "<C-w>": false, "<C-l>": false, },
- "vim.useSystemClipboard": true
- ->
-
Web development
- installed prettier: code formatter: typescript, javascript, html, css, graphQL; live preview: see the html page;
- vscode icons
-
-
Keybindings
- reference: https://code.visualstudio.com/docs/getstarted/keybindings
- when accepts a bool variable
- custom commands are a pain.
- You can do something like with built-in variables
{ "key": "ctrl+shift+y", "command": "workbench.action.terminal.sendSequence", "args": { "text": "echo -n '${fileDirname}' | xclip -sel clip \u000D" } },
-
Use mouse less
- How to switch panes?
-
Explore version lens Sync
========================================================================
========================================================================
-
UnInstall Clangd
-
Use compilation database (
compile_commands.json
).cmake -B build -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=1 # equivalently in cmakelist.txt set(CMAKE_EXPORT_COMPILE_COMMANDS ON) cmake --build build/ cp build/compile_commands.json . #in the project folder where CMakeLists.txt gets defined
-
Go to
Edit UI
. See here if you don't see it -
Configure
c_cpp_properties.json
- And to start using parameter clicking, put vim in insert mode
-
Graveyard
- for moxi_dev
catkin profile add compile_commands catkin profile set compile_commands catkin config --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=1 catkin config -x suffix # run this command at diligent_ws. python collect_compile_commands.py buildcompile_commands(The build dir)
========================================================================
========================================================================
- when you see that your changes in vscode is not showing up in
git status
, likely it's vscode not saving.