Skip to content

Instantly share code, notes, and snippets.

@yaoqiangpersonal
Last active December 11, 2022 12:03
Show Gist options
  • Save yaoqiangpersonal/f18017024f8a2120017c3ccfb282e46d to your computer and use it in GitHub Desktop.
Save yaoqiangpersonal/f18017024f8a2120017c3ccfb282e46d to your computer and use it in GitHub Desktop.
neovim config #neovim #vim
let mapleader = "\<space>"
set clipboard=unnamedplus
" Packer插件管理
lua require('plugins')
if exists('g:vscode')
nnoremap <Leader>fc <Cmd>call VSCodeNotify('editor.action.formatDocument')<CR>
nnoremap <Leader>gs <Cmd>call VSCodeNotify('editor.action.triggerSuggest')<CR>
nnoremap <Leader>pd <Cmd>call VSCodeNotify('editor.action.peekDefinition')<CR>
nnoremap <Leader>qf <Cmd>call VSCodeNotify('editor.action.quickFix')<CR>
nnoremap <Leader>sp <Cmd>call VSCodeNotify('workbench.actions.view.problems')<CR>
nnoremap <Leader>tz <Cmd>call VSCodeNotify('workbench.action.toggleZenMode')<CR>
nnoremap <Leader>ts <Cmd>call VSCodeNotify('workbench.action.toggleSidebarVisibility')<CR>
nnoremap <Leader>oo <Cmd>call VSCodeNotify('workbench.action.output.toggleOutput')<CR>
nnoremap <Leader>oi <Cmd>call VSCodeNotify('typescript.removeUnusedImports')<CR>
nnoremap <Leader>ot <Cmd>call VSCodeNotify('workbench.action.terminal.toggleTerminal')<CR>
nnoremap <Leader>os <Cmd>call VSCodeNotify('workbench.action.openWorkspaceSettings')<CR>
nnoremap <Leader>op <Cmd>call VSCodeNotify('workbench.actions.view.problems')<CR>
nnoremap <Leader>ct <Cmd>call VSCodeNotify('workbench.action.terminal.kill')<CR>
nnoremap <Leader>op <Cmd>call VSCodeNotify('workbench.actions.view.problems')<CR>
nnoremap <Leader>sc <Cmd>call VSCodeNotifyVisual('workbench.action.showCommands',1)<CR>
nnoremap <Leader>sr <Cmd>call VSCodeNotify('workbench.view.debug')<CR>
nnoremap <Leader>co <Cmd>call VSCodeNotify('workbench.action.closeOtherEditors')<CR>
nnoremap <Leader>rs <Cmd>call VSCodeNotify('editor.action.rename')<CR>
nnoremap <Leader>ab <Cmd>call VSCodeNotify('workbench.action.tasks.runTask',"npm-dev")<CR>
nnoremap <Leader>at <Cmd>call VSCodeNotify('workbench.action.tasks.runTask',"type-check")<CR>
nnoremap <Leader>al <Cmd>call VSCodeNotify('workbench.action.tasks.runTask',"npm-lint")<CR>
nnoremap <Leader>ml <Cmd>call VSCodeNotify('workbench.action.moveEditorLeftInGroup')<CR>
nnoremap <Leader>mr <Cmd>call VSCodeNotify('workbench.action.moveEditorRightInGroup')<CR>
nnoremap <Leader>rt <Cmd>call VSCodeNotify('workbench.action.tasks.test')<CR>
nnoremap gf <Cmd>call VSCodeNotify('workbench.action.quickOpen')<CR>
nnoremap gd <Cmd>call VSCodeNotify('editor.action.revealDefinition')<CR>
nnoremap ge <Cmd>call VSCodeNotify('editor.action.marker.nextInFiles')<CR>
nnoremap gs <Cmd>call VSCodeNotify('workbench.action.gotoSymbol')<CR>
else
set number
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment