commit 457159e9097e7111f76f08fa4c02d0266c32e25c Author: Wilfried OLLIVIER Date: Sun Apr 10 17:41:54 2022 +0200 Initial commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/keybindings.json b/keybindings.json new file mode 100644 index 0000000..e219aa2 --- /dev/null +++ b/keybindings.json @@ -0,0 +1,329 @@ +[ + // Vim + { + "key": "ctrl+i", + "command": "extension.vim_ctrl+i", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + }, + // Terminals + { + "key": "cmd+t", + "command": "workbench.action.terminal.toggleTerminal" + }, + { + "key": "ctrl+o", + "command": "workbench.action.terminal.focusNext", + "when": "terminalFocus" + }, + { + "key": "ctrl+i", + "command": "workbench.action.terminal.focusPrevious", + "when": "terminalFocus" + }, + { + "key": "ctrl+k", + "command": "workbench.action.terminal.kill", + "when": "terminalFocus" + }, + { + "key": "ctrl+enter", + "command": "workbench.action.terminal.newInActiveWorkspace", + "when": "terminalFocus" + }, + { + "key": "ctrl+shift+n", + "command": "workbench.action.terminal.split", + "when": "terminalFocus" + }, + { + "key": "ctrl+shift+o", + "command": "workbench.action.terminal.focusPreviousPane", + "when": "terminalFocus" + }, + { + "key": "ctrl+shift+i", + "command": "workbench.action.terminal.focusNextPane", + "when": "terminalFocus" + }, + { + "key": "pagedown", + "command": "workbench.action.terminal.scrollDownPage", + "when": "terminalFocus && terminalProcessSupported" + }, + { + "key": "shift+pagedown", + "command": "-workbench.action.terminal.scrollDownPage", + "when": "terminalFocus && terminalProcessSupported" + }, + { + "key": "pageup", + "command": "workbench.action.terminal.scrollUpPage", + "when": "terminalFocus && terminalProcessSupported" + }, + { + "key": "shift+pageup", + "command": "-workbench.action.terminal.scrollUpPage", + "when": "terminalFocus && terminalProcessSupported" + }, + // Navigations + { + "key": "ctrl+h", + "command": "list.collapse", + "when": "listFocus && !inputFocus" + }, + { + "key": "ctrl+l", + "command": "list.expand", + "when": "listFocus && !inputFocus" + }, + { + "key": "ctrl+k", + "command": "list.focusUp", + "when": "listFocus && !inputFocus" + }, + { + "key": "ctrl+j", + "command": "list.focusDown", + "when": "listFocus && !inputFocus" + }, + { + "key": "ctrl+j", + "command": "selectNextSuggestion", + "when": "suggestWidgetVisible" + }, + { + "key": "ctrl+k", + "command": "selectPrevSuggestion", + "when": "suggestWidgetVisible" + }, + { + "key": "ctrl+j", + "command": "workbench.action.quickOpenSelectNext", + "when": "inQuickOpen" + }, + { + "key": "ctrl+k", + "command": "workbench.action.quickOpenSelectPrevious", + "when": "inQuickOpen" + }, + { + "key": "ctrl+q ctrl+q", + "command": "workbench.action.closeEditorsInOtherGroups", + "when": "editorTextFocus" + }, + { + "key": "ctrl+q ctrl+o", + "command": "workbench.action.closeOtherEditors" + }, + { + "key": "ctrl+q ctrl+w", + "command": "workbench.action.closeAllEditors" + }, + // Cursor hover + { + "key": "ctrl+i ctrl+i", + "command": "editor.action.showHover", + "when": "editorTextFocus" + }, + { + "key": "ctrl+k ctrl+i", + "command": "-editor.action.showHover", + "when": "editorTextFocus" + }, + // Diff navigation + { + "key": "ctrl+d n", + "command": "workbench.action.compareEditor.nextChange", + "when": "textCompareEditorVisible" + }, + { + "key": "ctrl+d p", + "command": "workbench.action.compareEditor.previousChange", + "when": "textCompareEditorVisible" + }, + // Error navigation + { + "key": "ctrl+e n", + "command": "editor.action.marker.nextInFiles", + "when": "editorFocus && !editorReadonly" + }, + { + "key": "ctrl+e p", + "command": "editor.action.marker.prevInFiles", + "when": "editorFocus && !editorReadonly" + }, + { + "key": "f8", + "command": "-editor.action.marker.nextInFiles", + "when": "editorFocus && !editorReadonly" + }, + { + "key": "shift+f8", + "command": "-editor.action.marker.prevInFiles", + "when": "editorFocus && !editorReadonly" + }, + // Panel + { + "key": "ctrl+,", + "command": "workbench.action.toggleMaximizedPanel" + }, + { + "key": "ctrl+space", + "command": "vspacecode.space" + }, + // Misc resets with no rebind + { + "key": "ctrl+o", + "command": "-extension.vim_ctrl+o", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + }, + // Notifications + { + "key": "ctrl+y ;", + "command": "notifications.clearAll" + }, + { + "key": "ctrl+y .", + "command": "notifications.showList" + }, + // Multiple cursors + { + "key": "ctrl+shift+j", + "command": "editor.action.insertCursorBelow", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+k", + "command": "editor.action.insertCursorAbove", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+j", + "command": "-workbench.action.search.toggleQueryDetails", + "when": "inSearchEditor || searchViewletFocus" + }, + { + "key": "ctrl+shift+down", + "command": "-editor.action.insertCursorBelow", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+up", + "command": "-editor.action.insertCursorAbove", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+k", + "command": "-editor.action.deleteLines", + "when": "textInputFocus && !editorReadonly" + }, + // Git + { + "key": "ctrl+g s", + "command": "git.stage" + }, + { + "key": "ctrl+g u", + "command": "git.unstage" + }, + { + "key": "ctrl+g s", + "command": "git.stageSelectedRanges", + "when": "isInDiffEditor" + }, + { + "key": "ctrl+g u", + "command": "git.unstageSelectedRanges", + "when": "isInDiffEditor" + }, + { + "key": "ctrl+g o", + "command": "git.openChange" + }, + { + "key": "ctrl+k ctrl+alt+s", + "command": "-git.stageSelectedRanges", + "when": "isInDiffEditor" + }, + { + "key": "ctrl+k ctrl+u", + "command": "-git.unstageSelectedRanges", + "when": "isInDiffEditor" + }, + // Magit + { + "key": "tab", + "command": "extension.vim_tab", + "when": "editorFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'" + }, + { + "key": "g g", + "command": "cursorTop", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + }, + { + "key": "x", + "command": "magit.discard-at-point", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + }, + { + "key": "n", + "command": "magit.reverse-at-point", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + }, + { + "key": "shift+o", + "command": "magit.resetting", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + }, + { + "key": "shift+n", + "command": "magit.reverting", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + }, + // Magit resets + { + "key": "k", + "command": "-magit.discard-at-point" + }, + { + "key": "tab", + "command": "-extension.vim_tab", + "when": "editorFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'" + }, + { + "key": "shift+v", + "command": "-magit.reverting" + }, + { + "key": "shift+x", + "command": "-magit.resetting" + }, + { + "key": "x", + "command": "-magit.reset-mixed" + }, + { + "key": "ctrl+u x", + "command": "-magit.reset-hard" + }, + { + "key": "v", + "command": "-magit.reverse-at-point" + }, + { + "key": "shift+1", + "command": "-magit.running", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + }, + { + "key": "shift+5", + "command": "-magit.worktree", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + }, + { + "key": "shift+4", + "command": "-magit.process-log", + "when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" + } +] diff --git a/settings.json b/settings.json new file mode 100644 index 0000000..8af62d2 --- /dev/null +++ b/settings.json @@ -0,0 +1,230 @@ +{ + "vim.easymotion": true, + "vim.incsearch": true, + "vim.useSystemClipboard": true, + "vim.useCtrlKeys": true, + "vim.hlsearch": true, + "vim.visualModeKeyBindingsNonRecursive": [ + { + "before": ["", "c"], + "commands": ["editor.action.commentLine", "extension.vim_escape"] + } + ], + "vim.insertModeKeyBindings": [ + { + "before": ["j", "j"], + "after": [""] + } + ], + "vim.normalModeKeyBindingsNonRecursive": [ + { + "before": ["", "c"], + "commands": ["editor.action.commentLine", "extension.vim_escape"] + }, + { + "before": ["", "n"], + "commands": [":nohl"] + }, + { + "before": ["", "r", "s"], + "commands": ["rest-client.request"] + }, + { + "before": ["", "r", "r"], + "commands": ["rest-client.rerun-last-request"] + }, + { + "before": ["", "r", "c"], + "commands": ["rest-client.cancel-request"] + }, + { + "before": [""], + "commands": ["workbench.action.files.save"] + }, + { + "before": ["", ""], + "commands": ["whichkey.show"] + }, + { + "before": ["", "w"], + "commands": ["workbench.action.splitEditor"] + }, + { + "before": ["", "d"], + "commands": ["workbench.action.splitEditorDown"] + }, + { + "before": ["", "t"], + "commands": ["workbench.action.toggleSidebarVisibility"] + }, + { + "before": ["", "f"], + "commands": ["revealInExplorer"] + }, + { + "before": ["", "o", "i"], + "commands": ["workbench.action.showEditorsInActiveGroup"] + }, + { + "before": ["", "o", "o"], + "commands": ["workbench.action.quickOpen"] + }, + { + "before": ["", "o", "g"], + "commands": ["workbench.action.showAllSymbols"] + }, + { + "before": ["", "g", "d"], + "commands": ["editor.action.revealDefinition"] + }, + { + "before": ["", "g", "r"], + "commands": ["references-view.find"] + }, + { + "before": ["", "g", "t"], + "commands": ["editor.action.referenceSearch.trigger"] + }, + { + "before": ["", "h"], + "commands": ["workbench.action.focusLeftGroup"] + }, + { + "before": ["", "j"], + "commands": ["workbench.action.focusBelowGroup"] + }, + { + "before": ["", "k"], + "commands": ["workbench.action.focusAboveGroup"] + }, + { + "before": ["", "l"], + "commands": ["workbench.action.focusRightGroup"] + }, + { + "before": ["", "g", "s"], + "commands": ["magit.status"] + }, + { + "before": ["", "r", "u"], + "commands": ["extension.rubyBlockToggle"] + } + ], + "vim.leader": ",", + "vim.handleKeys": { + "": false, + "": false, + "": false, + "": false, + "": false, + "": false, + "": false + }, + "vim.statusBarColorControl": false, + "editor.fontFamily": "'JetBrainsMono Nerd Font', Monaco, 'Courier New', monospace", + "editor.fontSize": 10, + "editor.bracketPairColorization.enabled": true, + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, + "editor.fontLigatures": true, + "editor.formatOnPaste": true, + "editor.formatOnType": false, + "editor.formatOnSave": true, + "editor.suggestSelection": "first", + "editor.renderWhitespace": "boundary", + "editor.renderControlCharacters": false, + "editor.cursorSmoothCaretAnimation": true, + "editor.smoothScrolling": true, + "editor.cursorBlinking": "smooth", + "editor.minimap.enabled": false, + "editor.tabSize": 8, + "editor.cursorStyle": "line", + "zenMode.hideStatusBar": false, + "zenMode.hideTabs": false, + "zenMode.hideLineNumbers": false, + "editor.insertSpaces": false, + "editor.lineNumbers": "on", + "editor.wordSeparators": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-", + "editor.wordWrap": "off", + "terminal.integrated.enablePersistentSessions": false, + "terminal.integrated.fontFamily": "'JetBrainsMono Nerd Font'", + "terminal.integrated.fontSize": 10, + "workbench.colorTheme": "Gruvbox Dark Medium", + "workbench.colorCustomizations": { + "editorBracketHighlight.foreground1": "#d79921", + "editorBracketHighlight.foreground2": "#458588", + "editorBracketHighlight.foreground3": "#b16286", + "editorBracketHighlight.foreground4": "#689d6a", + "editorBracketHighlight.foreground5": "#d65d0e", + "editorBracketHighlight.foreground6": "#ebbdb2" + }, + "workbench.iconTheme": "bearded-icons", + "workbench.sideBar.location": "right", + "redhat.telemetry.enabled": false, + "gitlens.advanced.messages": { + "suppressCommitHasNoPreviousCommitWarning": false, + "suppressCommitNotFoundWarning": false, + "suppressFileNotUnderSourceControlWarning": false, + "suppressGitVersionWarning": false, + "suppressLineUncommittedWarning": false, + "suppressNoRepositoryWarning": false + }, + "gitlens.keymap": "alternate", + "Lua.telemetry.enable": false, + "go.toolsManagement.autoUpdate": true, + "go.formatTool": "goimports", + "go.useLanguageServer": true, + "go.lintTool": "golint", + "solargraph.autoformat": true, + "solargraph.commandPath": "solargraph", + "ruby.lint": { + "rubocop": true + }, + "ruby.format": "rubocop", + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.tabSize": 2, + "editor.insertSpaces": true + }, + "[python]": { + "editor.tabSize": 4, + "editor.insertSpaces": true + }, + "[ruby]": { + "editor.tabSize": 2, + "editor.insertSpaces": true, + "editor.defaultFormatter": "rebornix.ruby" + }, + "[javascript]": { + "editor.tabSize": 2, + "editor.insertSpaces": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[elixir]": { + "editor.tabSize": 2, + "editor.insertSpaces": true + }, + "[crystal]": { + "editor.tabSize": 2, + "editor.insertSpaces": true + }, + "[erlang]": { + "editor.tabSize": 2, + "editor.insertSpaces": true + }, + "[html]": { + "editor.tabSize": 4, + "editor.insertSpaces": true + }, + "[rust]": { + "editor.tabSize": 4, + "editor.insertSpaces": true + }, + "[yaml]": { + "editor.defaultFormatter": "redhat.vscode-yaml" + }, + "emmet.includeLanguages": { + "erb": "html" + } +}