Last active
November 21, 2023 19:32
-
-
Save fmind/67c1ce34d0f21005b4aa7aa79b9162aa to your computer and use it in GitHub Desktop.
VS Code Settings & Keybindings for AI, ML and MLOps development in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// ACTIONS | |
{ | |
"key": "alt+a", | |
"command": "workbench.action.showAllSymbols" | |
}, | |
{ | |
"key": "alt+b", | |
"command": "workbench.action.navigateBack" | |
}, | |
{ | |
"key": "alt+c", | |
"command": "workbench.panel.chat.view.copilot.focus" | |
}, | |
{ | |
"key": "alt+d", | |
"command": "workbench.view.debug" | |
}, | |
{ | |
"key": "alt+e", | |
"command": "workbench.view.explorer" | |
}, | |
{ | |
"key": "alt+f", | |
"command": "workbench.action.navigateForward" | |
}, | |
{ | |
"key": "alt+g", | |
"command": "workbench.view.scm" | |
}, | |
{ | |
"key": "alt+h", | |
"command": "workbench.action.focusLeftGroup" | |
}, | |
{ | |
"key": "alt+i", | |
"command": "extension.invokeTask" | |
}, | |
{ | |
"key": "alt+j", | |
"command": "workbench.action.previousEditor" | |
}, | |
{ | |
"key": "alt+k", | |
"command": "workbench.action.nextEditor" | |
}, | |
{ | |
"key": "alt+l", | |
"command": "workbench.action.focusRightGroup" | |
}, | |
{ | |
"key": "alt+m", | |
"command": "workbench.action.maximizeEditor" | |
}, | |
{ | |
"key": "alt+n", | |
"command": "workbench.action.focusBelowGroup" | |
}, | |
{ | |
"key": "alt+o d", | |
"command": "workbench.action.openQuickChat.copilot" | |
}, | |
{ | |
"key": "alt+o d", | |
"command": "github.copilot.interactiveEditor.generateDocs" | |
}, | |
{ | |
"key": "alt+o e", | |
"command": "github.copilot.interactiveEditor.explain" | |
}, | |
{ | |
"key": "alt+o f", | |
"command": "github.copilot.interactiveEditor.fix" | |
}, | |
{ | |
"key": "alt+o o", | |
"command": "github.copilot.interactiveEditor.generate" | |
}, | |
{ | |
"key": "alt+o g", | |
"command": "github.copilot.generate" | |
}, | |
{ | |
"key": "alt+o t", | |
"command": "github.copilot.interactiveEditor.generateTests" | |
}, | |
{ | |
"key": "alt+p", | |
"command": "workbench.action.focusAboveGroup" | |
}, | |
{ | |
"key": "alt+q", | |
"command": "workbench.action.showCommands" | |
}, | |
{ | |
"key": "alt+r", | |
"command": "workbench.action.tasks.runTask" | |
}, | |
{ | |
"key": "alt+s", | |
"command": "workbench.action.gotoSymbol" | |
}, | |
{ | |
"key": "alt+u", | |
"command": "outline.focus" | |
}, | |
{ | |
"key": "alt+t", | |
"command": "workbench.panel.testResults.view.focus" | |
}, | |
{ | |
"key": "alt+v", | |
"command": "workbench.action.output.toggleOutput" | |
}, | |
{ | |
"key": "alt+w", | |
"command": "workbench.action.evenEditorWidths" | |
}, | |
{ | |
"key": "alt+x", | |
"command": "workbench.view.extension.test" | |
}, | |
{ | |
"key": "alt+y", | |
"command": "workbench.debug.action.toggleRepl" | |
}, | |
{ | |
"key": "alt+z", | |
"command": "workbench.actions.view.problems" | |
}, | |
{ | |
"key": "alt+-", | |
"command": "workbench.action.terminal.runRecentCommand" | |
}, | |
{ | |
"key": "alt+=", | |
"command": "workbench.action.toggleMaximizedPanel" | |
}, | |
{ | |
"key": "alt+,", | |
"command": "workbench.action.terminal.new" | |
}, | |
{ | |
"key": "alt+.", | |
"command": "workbench.action.terminal.splitInActiveWorkspace" | |
}, | |
{ | |
"key": "alt+/", | |
"command": "workbench.action.newGroupRight" | |
}, | |
{ | |
"key": "alt+space", | |
"command": "editor.action.inlineSuggest.trigger" | |
}, | |
// DISABLED | |
{ | |
"key": "cmd+enter", | |
"command": "-editor.action.insertLineAfter", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+enter", | |
"command": "-github.copilot.generate", | |
"when": "editorTextFocus && github.copilot.activated" | |
}, | |
{ | |
"key": "cmd+b", | |
"command": "-markdown.extension.editing.toggleBold", | |
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^qmd$/" | |
}, | |
// JUPYTER | |
{ | |
"key": "n", | |
"command": "notebook.cell.insertMarkdownCellBelow", | |
"when": "notebookEditorFocused && !inputFocus" | |
}, | |
{ | |
"key": "p", | |
"command": "notebook.cell.insertMarkdownCellAbove", | |
"when": "notebookEditorFocused && !inputFocus" | |
}, | |
// POPUPS | |
{ | |
"key": "alt+h", | |
"command": "file-browser.stepOut", | |
"when": "inFileBrowser" | |
}, | |
{ | |
"key": "alt+l", | |
"command": "file-browser.stepIn", | |
"when": "inFileBrowser" | |
}, | |
{ | |
"key": "alt+h", | |
"command": "list.collapse", | |
"when": "listFocus && !inputFocus" | |
}, | |
{ | |
"key": "alt+l", | |
"command": "list.expand", | |
"when": "listFocus && !inputFocus" | |
}, | |
{ | |
"key": "alt+j", | |
"command": "list.focusDown", | |
"when": "listFocus && !inputFocus" | |
}, | |
{ | |
"key": "alt+k", | |
"command": "list.focusUp", | |
"when": "listFocus && !inputFocus" | |
}, | |
{ | |
"key": "alt+j", | |
"command": "workbench.action.quickOpenSelectNext", | |
"when": "inQuickOpen" | |
}, | |
{ | |
"key": "alt+k", | |
"command": "workbench.action.quickOpenSelectPrevious", | |
"when": "inQuickOpen" | |
}, | |
{ | |
"key": "alt+j", | |
"command": "selectNextSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
{ | |
"key": "alt+k", | |
"command": "selectPrevSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
{ | |
"key": "alt+l", | |
"command": "acceptSelectedSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
{ | |
"key": "alt+j", | |
"command": "showNextParameterHint", | |
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible" | |
}, | |
{ | |
"key": "alt+k", | |
"command": "showPrevParameterHint", | |
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible" | |
}, | |
// TERMINALS | |
{ | |
"key": "alt+;", | |
"when": "!terminalFocus", | |
"command": "terminal.focus" | |
}, | |
{ | |
"key": "alt+;", | |
"when": "terminalFocus", | |
"command": "workbench.action.focusLastEditorGroup" | |
}, | |
{ | |
"key": "alt+shift+;", | |
"command": "workbench.action.terminal.rename" | |
}, | |
{ | |
"key": "alt+'", | |
"command": "workbench.action.terminal.runSelectedText" | |
}, | |
{ | |
"key": "alt+shift+'", | |
"command": "workbench.action.terminal.runActiveFile" | |
}, | |
{ | |
"key": "alt+shift+]", | |
"command": "workbench.action.terminal.focusNext", | |
}, | |
{ | |
"key": "alt+shift+[", | |
"command": "workbench.action.terminal.focusPrevious", | |
}, | |
{ | |
"key": "alt+]", | |
"command": "workbench.action.terminal.focusNextPane", | |
"when": "terminalFocus" | |
}, | |
{ | |
"key": "alt+[", | |
"command": "workbench.action.terminal.focusPreviousPane", | |
"when": "terminalFocus" | |
}, | |
// VIM | |
{ | |
"key": "cmd+d", | |
"command": "extension.vim_ctrl+d", | |
"when": "editorTextFocus && vim.active && vim.use<C-d> && !inDebugRepl" | |
}, | |
{ | |
"key": "cmd+u", | |
"command": "extension.vim_ctrl+u", | |
"when": "editorTextFocus && vim.active && vim.use<C-u> && !inDebugRepl" | |
}, | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// enable Code Spell Checker by default | |
"cSpell.enabled": true, | |
// limit Code Spell Checker to markdown files | |
"cSpell.enabledLanguageIds": [ | |
"markdown" | |
], | |
// use en-US language by default for Code Spell Checker | |
"cSpell.language": "en-US", | |
// don't accept completion on enter | |
"editor.acceptSuggestionOnEnter": "off", | |
// don't let the cursor blink (distracting) | |
"editor.cursorBlinking": "solid", | |
// smooth caret for smooth editing :) | |
"editor.cursorSmoothCaretAnimation": "on", | |
// always let 15 lines as a margin when you scroll | |
"editor.cursorSurroundingLines": 15, | |
// use Fira code as the main font (support ligatures) | |
"editor.fontFamily": "'Fira Code', monospace", | |
// enable programming ligature (e.g., replace -> by →) | |
"editor.fontLigatures": true, | |
// default font size, use something comfortable for your eyes! | |
"editor.fontSize": 14, | |
// format the code you copy-paste in your editor | |
"editor.formatOnPaste": true, | |
// show the completion next to your cursor | |
"editor.inlineSuggest.enabled": true, | |
// disable the minimap on the right (distracting) | |
"editor.minimap.enabled": false, | |
// disable highlighting the word under the cursor (distracting) | |
"editor.occurrencesHighlight": false, | |
// don't highlight the current line (distracting) | |
"editor.renderLineHighlight": "none", | |
// smooth scrolling for smooth developments :) | |
"editor.smoothScrolling": true, | |
// required to use IntelliSense suggestions | |
"editor.suggestSelection": "first", | |
// enable tab completion (complete code by pressing tab) | |
"editor.tabCompletion": "on", | |
// if the line is longer than your window, display it on several lines | |
"editor.wordWrap": "on", | |
// don't automatically select files in explorer when you open them | |
"explorer.autoReveal": false, | |
// don't ask for confirmation when you delete a file | |
"explorer.confirmDelete": false, | |
// don't ask for confirmation when you drag and drop a file | |
"explorer.confirmDragAndDrop": false, | |
// save your file before switching to another one | |
"files.autoSave": "onFocusChange", | |
// set Python as the default language for new files | |
"files.defaultLanguage": "python", | |
// always have an empty line at the end of the file | |
"files.insertFinalNewline": true, | |
// use VS Code file explorer instead of the operating system | |
"files.simpleDialog.enable": true, | |
// remove whitespaces at the end of each line | |
"files.trimTrailingWhitespace": true, | |
// automatically fetch repository changes from GitHub | |
"git.autofetch": true, | |
// don't ask for confirmation before synchronizing git repositories | |
"git.confirmSync": false, | |
// commit all unstaged files using VS Code Source Control Tab | |
"git.enableSmartCommit": true, | |
// disable GitLens code lens (distracting) | |
"gitlens.codeLens.enabled": false, | |
// disable GitLens annotations on current line (distracting) | |
"gitlens.currentLine.enabled": false, | |
// trigger hover for the current line | |
"gitlens.hovers.currentLine.over": "line", | |
// create a vertical colored line for indentation | |
"indentRainbow.indicatorStyle": "light", | |
// don't ask when restarting Jupyter kernels | |
"jupyter.askForKernelRestart": false, | |
// allow to step out of user written code | |
"jupyter.debugJustMyCode": false, | |
// create an interactive window per file (see tips and tricks) | |
"jupyter.interactiveWindow.creationMode": "perFile", | |
// send the selected code to the interactive window instead of terminal | |
"jupyter.interactiveWindow.textEditor.executeSelection": true, | |
// enable the auto-reload extension by default for Jupyter notebooks | |
"jupyter.runStartupCommands": [ | |
"%load_ext autoreload", | |
"%autoreload 2" | |
], | |
// disable smart scrolling (lock scrolling when output view is selected) | |
"output.smartScroll.enabled": false, | |
// automatically format Python imports and code on save | |
"[python]": { | |
"editor.codeActionsOnSave": { | |
"source.organizeImports": true, | |
}, | |
"editor.defaultFormatter": "ms-python.black-formatter", | |
}, | |
// disable redhat telemetry (avoid a popup on first use) | |
"redhat.telemetry.enabled": false, | |
// allow untrusted files in the workspace when opened | |
"security.workspace.trust.untrustedFiles": "open", | |
// don't synchronize the following settings | |
"settingsSync.ignoredSettings": [ | |
"projectManager.git.baseFolders" | |
], | |
// use the same keybindings on Linux, Mac, and Windows | |
// note: you might want to drop this setting depending on your keybindings | |
"settingsSync.keybindingsPerPlatform": false, | |
// don't ask which problem matcher to use for executing VS Code tasks | |
"task.problemMatchers.neverPrompt": true, | |
// disable multiline paste warning by default | |
"terminal.integrated.enableMultiLinePasteWarning": false, | |
// enabled stronger integration between VS Code and the terminal | |
"terminal.integrated.shellIntegration.enabled": true, | |
// don't automatically open the peek view after running unit tests | |
"testing.automaticallyOpenPeekView": "never", | |
// don't follow the test currently running in the Test Explorer View | |
"testing.followRunningTest": false, | |
// open the Text Explorer View on failure | |
"testing.openTesting": "openOnTestFailure", | |
// enable easy motion (fast code navigation) | |
"vim.easymotion": true, | |
// don't open fold when you move with j or k | |
"vim.foldfix": true, | |
// substitute all matches in a line by default | |
"vim.gdefault": true, | |
// highlight the content you copy | |
"vim.highlightedyank.enable": true, | |
// highlight the content you are searching | |
"vim.hlsearch": true, | |
// move your cursor as you type your search pattern | |
"vim.incsearch": true, | |
// use space for some advanced shortcuts | |
"vim.leader": "<space>", | |
// replace text with previous copy-paste content | |
"vim.replaceWithRegister": true, | |
// display line number relative to your position (e.g., +8, -5) | |
"vim.smartRelativeLine": true, | |
// another fast navigation mode (faster, but simpler) | |
"vim.sneak": true, | |
// let Vim control your Ctrl key or not (e.g., Vim < VS Code) | |
"vim.useCtrlKeys": false, | |
// synchronize Vim and your system clipboard | |
"vim.useSystemClipboard": true, | |
// start a search in visual mode with * or # | |
"vim.visualstar": true, | |
// force some Vim shortcuts (move up and down 1 page) | |
"vim.handleKeys": { | |
"<C-d>": true, | |
"<C-u>": true | |
}, | |
// ask VS Code to change settings required for running IntelliCode | |
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", | |
// replace VS Code title bar by the command certer (menu, selections, widgets, ...) | |
"window.commandCenter": true, | |
// don't enable mnemonics shortcuts (e.g., ALT + ...) | |
// this is related to my Alt-key trick, more on that later | |
"window.enableMenuBarMnemonics": false, | |
// authorize the title bar to be changed for enabling the command center | |
"window.titleBarStyle": "custom", | |
// don't preview file (pending opening state), open them directly instead | |
"workbench.editor.enablePreview": false, | |
// focus on the tab on the left instead of the most recent one | |
"workbench.editor.focusRecentEditorAfterClose": false, | |
// all open tab will be opened in multiple line (instead of scroll bar) | |
"workbench.editor.wrapTabs": true, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment