Visual Studio Code configuration for django
.vscode
launch.json
settings.json
tasks.json
ctrl+shift+p
python:Select Interpreter
ctrl+shift+p
Python
> Django
Run Build Task (Ctrl+Shift+B).
Ctrl+Shift+B
File
> Add Folder to Workspace...
File
> Save Workspace As...
choose a name for this file for example project
click on Manage
(setting like icon on left lower corner) > Keyborad Shortcuts
(or press ctrl+k
and ctrl+s
consecutively)
search workbench.files.action.collapseExplorerFolders
+
to add a shortcut
click on Manage
(setting like icon on left lower corner) > Settings
(or press ctrl+,
)
search workbench.editor.enablePreview
File
> Add Folder to Workspace...
File
> Save Workspace As...
choose a name for this file for example project
this file contains the settings related to the currunt project
this is helpful incase you want some settings or configuration only for your current folder but not for all vscode global settings.
setting > Format on Save
check this field
Make this to true so the pritter will format the document.
Alt
+ ←
Alt
+ ← or Alt
+ →
settings > open folder in new window
settings > open folder in new window
dropdown to on
workbench.editor.enablePreview
settings
> workbench.editor.enablePreview
uncheck to make changes(means set to false)
setting
> click on Extensions
> click on Edit in settings.json
add"emmet.includeLanguages": {"django-html": "html"},
ctrl + u
ctrl + \
ctrl + k + 0
ctrl + k + j
make selection of the lines which you want in one line
F1
search join lines
hit enter
ctrl + Tab
(this will run the code in a new python shell) shift + enter
Ctrl + Shift + \
Ctrl + j
alt + scroll
f8
crtl+click
or f12
install pylance
extention
now to go to settings
and search python.analysis.autoImportCompletions
mark it check
go to settings
and search python.analysis.packageIndexDepths
click on Edit in settings.json
increase the depth. restart vs code and wait for a bit
go to
File > Preferences > > Keyboard Shortcuts
search for Terminal Focus Previous Terminal
workbench.action.terminal.focusNext
add shotrcut ctrl+shift+alt+.
install pylance extention
now to go to settings and search python.analysis.autoImportCompletions
mark it check
increarse the depth for auto import
go to settings and search python.analysis.packageIndexDepths
click on Edit in settings.json
increase the depth. restart vs code and wait for a bit
ctrl+shift+alt+,
workbench.action.terminal.focusPrevious
ctrl+shift+alt+b
workbench.action.tasks.restartTask
ctrl+shift+alt+c
workbench.files.action.collapseExplorerFolders
{
"key": "ctrl+shift+alt+oem_period",
"command": "workbench.action.terminal.focusNext"
}
{
"key": "ctrl+shift+alt+oem_comma",
"command": "workbench.action.terminal.focusPrevious"
}
{
"key": "ctrl+shift+alt+b",
"command": "workbench.action.tasks.restartTask"
}
{
"key": "ctrl+shift+alt+c",
"command": "workbench.files.action.collapseExplorerFolders"
}