Skip to content

Instantly share code, notes, and snippets.

@fmind
Last active May 24, 2024 20:06
Show Gist options
  • Save fmind/5f9d89bf5884c58e175f36ad25caa8a0 to your computer and use it in GitHub Desktop.
Save fmind/5f9d89bf5884c58e175f36ad25caa8a0 to your computer and use it in GitHub Desktop.
GCP
set editing-mode vi
" vim: fdm=marker
" CONFS {{{
" INIT {{{
set nocompatible
" }}}
" BUFFER {{{
set hidden
set confirm
set autoread
set autowrite
" }}}
" DIVIDE {{{
set splitbelow
set splitright
" }}}
" FORMAT {{{
set autoindent
set formatoptions-=cro
" }}}
" FOLDER {{{
set foldmethod=indent
set foldlevelstart=99
" }}}
" INDENT {{{
set tabstop=4
set expandtab
set shiftround
set shiftwidth=4
set softtabstop=4
" }}}
" NUMBER {{{
set number
set relativenumber
" }}}
" REVIEW {{{
set wildmode=list:longest,full
set completeopt=menuone,longest
" }}}
" SEARCH {{{
set gdefault
set hlsearch
set incsearch
set smartcase
set ignorecase
" }}}
" SYSTEM {{{
set shell=/bin/bash
set clipboard=unnamedplus
" }}}
" WINDOW {{{
set linebreak
set lazyredraw
set shortmess=I
set scrolloff=10
" }}}
" }}}
" COLORS {{{
colorscheme zellner
" }}}
" REMAPS {{{
nnoremap j gj
nnoremap k gk
nnoremap B g^
nnoremap E g$
nnoremap Y y$
xnoremap < <gv
xnoremap > >gv
nnoremap <CR> :
nnoremap U <C-r>
noremap gl :nohl<CR>
cnoremap <C-p> <UP>
cnoremap <C-n> <DOWN>
" }}}
" LEADERS {{{
noremap <CR> :
let mapleader="\<space>"
noremap <leader>< :prev<CR>
noremap <leader>> :lnext<CR>
noremap <leader>( :cprev<CR>
noremap <leader>) :cnext<CR>
noremap <leader>} :tnext<CR>
noremap <leader>{ :tprev<CR>
noremap <leader>j :bnext<CR>
noremap <leader>k :bprevious<CR>
noremap <leader>q :bdelete<CR>:bnext<CR>
noremap <leader><CR> :make<CR>
noremap <leader><tab> :b#<CR>
noremap <leader><space> :make
noremap <leader>. :edit $MYVIMRC<CR>
" }}}
" COMMANDS {{{
command! Config execute ":e $MYVIMRC"
command! Reload execute "source $MYVIMRC"
" }}}
" AUTOGROUPS {{{
" AutoVim {{{
augroup vim
autocmd!
autocmd BufWritePost $MYVIMRC source $MYVIMRC
augroup end
" }}}
" }}}
- ms-toolsai/jupyter
- vscodevim/vim
[
// ACTIONS
{
"key": "alt+a",
"command": "workbench.action.showAllSymbols"
},
{
"key": "alt+b",
"command": "workbench.action.navigateBack"
},
{
"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": "inlineChat.start"
},
{
"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.toggleMaximizeEditorGroup"
},
{
"key": "alt+n",
"command": "workbench.action.focusBelowGroup"
},
{
"key": "alt+o",
"command": "cloudcode.gemini.chatView.focus"
},
{
"key": "alt+p",
"command": "workbench.action.focusAboveGroup"
},
{
"key": "alt+q",
"command": "workbench.action.showCommands"
},
{
"key": "alt+r",
"command": "extension.invokeTask"
},
{
"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.toggleEditorWidths"
},
{
"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": "cmd+b",
"command": "-markdown.extension.editing.toggleBold",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
{
"key": "ctrl+b",
"command": "-markdown.extension.editing.toggleBold",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
// 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"
},
]
{
"editor.acceptSuggestionOnEnter": "off",
"editor.bracketPairColorization.enabled": true,
"editor.cursorBlinking": "solid",
"editor.cursorSmoothCaretAnimation": "on",
"editor.cursorSurroundingLines": 15,
"editor.fontFamily": "'Fira Code', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.formatOnPaste": true,
"editor.inlineSuggest.enabled": true,
"editor.lineHeight": 20,
"editor.minimap.enabled": false,
"editor.occurrencesHighlight": false,
"editor.renderLineHighlight": "none",
"editor.renderWhitespace": "trailing",
"editor.semanticHighlighting.enabled": true,
"editor.smoothScrolling": true,
"editor.suggestSelection": "first",
"editor.tabCompletion": "on",
"editor.wordWrap": "on",
"explorer.autoReveal": false,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"files.autoSave": "onFocusChange",
"files.defaultLanguage": "python",
"files.insertFinalNewline": true,
"files.simpleDialog.enable": true,
"files.trimTrailingWhitespace": true,
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.openRepositoryInParentFolders": "never",
"github.gitProtocol": "ssh",
"http.proxySupport": "off",
"jupyter.askForKernelRestart": false,
"jupyter.debugJustMyCode": false,
"jupyter.interactiveWindow.creationMode": "perFile",
"jupyter.interactiveWindow.textEditor.executeSelection": true,
"jupyter.runStartupCommands": [
"%load_ext autoreload",
"%autoreload 2"
],
"output.smartScroll.enabled": false,
"redhat.telemetry.enabled": false,
"security.workspace.trust.untrustedFiles": "open",
"task.problemMatchers.neverPrompt": true,
"terminal.integrated.defaultProfile.linux": "Google Cloud Shell",
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.defaultProfile.windows": "zsh",
"terminal.integrated.shellIntegration.enabled": true,
"terminal.integrated.smoothScrolling": true,
"testing.automaticallyOpenPeekView": "never",
"testing.followRunningTest": false,
"testing.openTesting": "openOnTestFailure",
"vim.camelCaseMotion.enable": true,
"vim.changeWordIncludesWhitespace": true,
"vim.easymotion": true,
"vim.foldfix": true,
"vim.gdefault": true,
"vim.highlightedyank.enable": true,
"vim.hlsearch": true,
"vim.incsearch": true,
"vim.leader": "<space>",
"vim.replaceWithRegister": true,
"vim.smartRelativeLine": true,
"vim.sneak": true,
"vim.useCtrlKeys": false,
"vim.useSystemClipboard": true,
"vim.visualstar": true,
"vim.handleKeys": {
"<C-d>": true,
"<C-u>": true
},
"vim.insertModeKeyBindingsNonRecursive": [],
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [
"g",
"l"
],
"commands": [
":nohl"
]
},
{
"before": [
"j"
],
"after": [
"g",
"j"
],
"when": "editorLangId == markdown"
},
{
"before": [
"k"
],
"after": [
"g",
"k"
],
"when": "editorLangId == markdown"
},
],
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": [
"g",
"l"
],
"commands": [
":nohl"
]
},
{
"before": [
"j"
],
"after": [
"g",
"j"
],
"when": "editorLangId == markdown"
},
{
"before": [
"k"
],
"after": [
"g",
"k"
],
"when": "editorLangId == markdown"
},
],
"window.commandCenter": true,
"workbench.colorTheme": "Default Light Modern",
"workbench.editor.enablePreview": false,
"workbench.editor.focusRecentEditorAfterClose": false,
"workbench.editor.wrapTabs": true,
"workbench.list.smoothScrolling": true,
"workbench.list.smoothScrolling": true,
"workbench.startupEditor": "welcomePageInEmptyWorkbench",
"zenMode.fullScreen": false,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment