VSCode tips and settings
keyboard shortcuts
VSCode explorer
Add new file
and new folder
keyboard shortcut in file explorer
Add key
to keybindings.json
file
Terminal
run script when terminal open
- rcfile: specify an alternative initialization file (RC file) to source when starting a new bash session
Editor
Tab key function
I accidentally pressed some key combonition and the "Tab" switch the focus mode between pans' using command pallette to change tab function
Add custom color to active tab
Preview mode
Preview mode
VSCode default
Preview Mode tabs are not kept open. As soon as you go to open another file from the sidebar, the existing Preview Mode tab (if one exists) is used. You can determine if a tab is in Preview Mode, by looking at its title in the tab bar. If the title is italic, the tab is in preview mode.
To open a file for editing (i.e. don't open in Preview Mode), double-click on the file in the sidebar, or single-click it in the sidebar then double click the title of its Preview Mode tab.
- Clicking on a file in the explorer opens it in the editor in preview (the file name well be italic).
- Dbl-clicking on a file in the explorer opens it in the editor in a new tab.
- To switch file from preview to tab, dbl-click on the file title bar. (or start to edit)