Browse Source

vim: color, builddb and indent find fixes

master
Mathieu Maret 4 months ago
parent
commit
22d7958cc4
  1. 1
      .vim/colors/mycolor.vim
  2. 3
      .vim/plugin/cscope_plus.vim
  3. 4
      .vimrc

1
.vim/colors/mycolor.vim

@ -93,6 +93,7 @@ endif
hi SpellBad ctermbg=None ctermfg=Red cterm=underline
hi SpellCap ctermfg=12 ctermfg=White gui=undercurl guisp=Blue
" to be used with set colorcolumn=81
highlight ColorColumn ctermbg=236
highlight ALEError ctermbg=DarkMagenta cterm=bold

3
.vim/plugin/cscope_plus.vim

@ -109,7 +109,7 @@ func! MenuCB(id, result)
elseif a:result == 4
call AutotagsAdd()
elseif a:result == 5
execute "!" . g:build_cmd . " --dry-run --always-make | grep -wE 'gcc|g++|cc' | grep -w '\\-c' | jq -nR '[inputs|{directory:\".\", command:., file: match(\" [^ ]+$\").string[1:]}]' > compile_commands.json"
execute "!" . g:build_cmd . " --dry-run --always-make | grep -wE 'gcc|g++|cc|clang|clang++' | grep -w '\\-c' | jq -nR '[inputs|{directory:\".\", command:., file: match(\" [^ ]+$\").string[1:]}]' > compile_commands.json"
elseif a:result == 6 "https://github.com/rizsotto/Bear
execute "!bear --" g:build_cmd "--always-make"
elseif a:result == 7 "https://github.com/nickdiego/compiledb
@ -117,6 +117,7 @@ func! MenuCB(id, result)
elseif a:result == 8 "https://github.com/rizsotto/scan-build
execute "!analyze-build"
endif
"Add -DCMAKE_EXPORT_COMPILE_COMMANDS=ON with cmake build
endfunc
command! ShowMenuCodeDb

4
.vimrc

@ -232,6 +232,10 @@ augroup END
fu DetectIndent()
if len(expand('%')) == 0
return
endif
execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output --default space --default-size ' . &tabstop .' "' . expand('%') . '"' )
if &expandtab
let b:clang_style="{BasedOnStyle: LLVM, AlignConsecutiveAssignments: true, AllowShortFunctionsOnASingleLine: Empty, BreakBeforeBraces: Linux, BreakStringLiterals: false, ColumnLimit: 95, IndentCaseLabels: true, IndentWidth: " .&shiftwidth .", TabWidth: " .&tabstop .", UseTab: Never}"

Loading…
Cancel
Save