X-Git-Url: https://git.sthu.org/?p=vimconf.git;a=blobdiff_plain;f=plugins-noroot-nolowendbox.vim;h=f802c9ced50c71524fe22fae4560cdfeb52c711d;hp=602724ec11f19477ea6c69579e2bf9ba02494d8a;hb=3aa781b69d23148ffd47b6b468f0aeec92dc800e;hpb=a7bd98a26484944d7db299009cc9cab309389c86 diff --git a/plugins-noroot-nolowendbox.vim b/plugins-noroot-nolowendbox.vim index 602724e..f802c9c 100644 --- a/plugins-noroot-nolowendbox.vim +++ b/plugins-noroot-nolowendbox.vim @@ -13,6 +13,7 @@ endif Plug 'artur-shaik/vim-javacomplete2', {'for': 'java'} Plug 'neomake/neomake' +Plug 'puremourning/vimspector' " Prevent slow foling update, e.g., for vimtex Plug 'Konfekt/FastFold' @@ -240,4 +241,35 @@ EOF let g:vimtex_fold_enabled = 1 let g:vimtex_fold_levelmarker = '➜' + au FileType c,cpp,obj,java,python packadd! vimspector + let g:vimspector_install_gadgets = [ 'debugpy', 'vscode-cpptools' ] + "let g:vimspector_enable_mappings = 'VISUAL_STUDIO' + + function VimspectorRestartOrCreateConfig() + if !filereadable('.vimspector.json') + execute 'tabe .vimspector.json' + else + call vimspector#Restart() + endif + endfunction + + nmap dc VimspectorContinue + nmap ds VimspectorStop + nmap dr :call VimspectorRestartOrCreateConfig() + nmap drr :call vimspector#Reset() + nmap dp VimspectorPause + nmap db VimspectorToggleBreakpoint + nmap dcb VimspectorToggleConditionalBreakpoint + nmap dfb VimspectorAddFunctionBreakpoint + nmap dtc VimspectorRunToCursor + nmap do VimspectorStepOver + nmap di VimspectorStepInto + nmap dof VimspectorStepOut + " for normal mode, the word under the cursor + nmap de VimspectorBalloonEval + " for visual mode, the visually selected text + xmap de VimspectorBalloonEval + + au BufNewFile .vimspector.json read ~/.vim/neosnippets/vimspector.json + endfunction