]> git.rmz.io Git - dotfiles.git/blobdiff - vim/ftplugin/cpp.vim
nvim: use nvim-origami for folds
[dotfiles.git] / vim / ftplugin / cpp.vim
index ea6837f7200683f9ed688fbd1ddd67419c1000bb..a039bacdca9557403cef9ca2c6b0a8a3b7eb5b55 100644 (file)
@@ -60,7 +60,7 @@ setlocal errorformat+=%X%*\\a:\ Leaving\ directory\ [`']%f'
 setlocal errorformat+=%*[^[]\[%tRROR\]%m\ \[%f:%l\]
 setlocal errorformat+=%*[^[]\[%tARNING\]%m\ \[%f:%l\]
 
-packadd termdebug
+packadd! termdebug
 let g:termdebug_wide = 1
 function! s:Debug(...)
     tabedit %
@@ -76,15 +76,3 @@ function! s:Debug(...)
 endfunction
 command! -nargs=* -complete=file -bang Debug call <SID>Debug() | Termdebug<bang> <args>
 command! -nargs=+ -complete=file -bang DebugCommand call <SID>Debug() | TermdebugCommand<bang> <args>
-
-setlocal foldmethod=syntax
-" set foldlevel according to number of matches of 'namespace' and 'class' not
-" containing ';'
-function! InitialFoldLevel()
-    let v:errmsg = ""
-    keepjumps keeppatterns silent! 1,/}/s/^\(namespace\|class\) \+[^;]*$//n
-    if v:errmsg == ""
-        let &l:foldlevel=str2nr(split(v:statusmsg)[0])
-    endif
-endf
-call InitialFoldLevel()