From 9931e0888b2419326ae10ebbfae532261c5c125f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Jun 2016 16:11:56 +0200 Subject: Fix submodules --- vim/bundle/vim-gitgutter | 1 + .../vim-gitgutter/autoload/gitgutter/highlight.vim | 115 --------------------- 2 files changed, 1 insertion(+), 115 deletions(-) create mode 160000 vim/bundle/vim-gitgutter delete mode 100644 vim/bundle/vim-gitgutter/autoload/gitgutter/highlight.vim (limited to 'vim/bundle/vim-gitgutter/autoload/gitgutter/highlight.vim') diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter new file mode 160000 index 0000000..b5f23e9 --- /dev/null +++ b/vim/bundle/vim-gitgutter @@ -0,0 +1 @@ +Subproject commit b5f23e986747a6f4b1dc1196d2a5bd3dc7c8c2b6 diff --git a/vim/bundle/vim-gitgutter/autoload/gitgutter/highlight.vim b/vim/bundle/vim-gitgutter/autoload/gitgutter/highlight.vim deleted file mode 100644 index e3b774b..0000000 --- a/vim/bundle/vim-gitgutter/autoload/gitgutter/highlight.vim +++ /dev/null @@ -1,115 +0,0 @@ -function! gitgutter#highlight#define_sign_column_highlight() abort - if g:gitgutter_override_sign_column_highlight - highlight! link SignColumn LineNr - else - highlight default link SignColumn LineNr - endif -endfunction - -function! gitgutter#highlight#define_highlights() abort - let [guibg, ctermbg] = gitgutter#highlight#get_background_colors('SignColumn') - - " Highlights used by the signs. - - execute "highlight GitGutterAddDefault guifg=#009900 guibg=" . guibg . " ctermfg=2 ctermbg=" . ctermbg - execute "highlight GitGutterChangeDefault guifg=#bbbb00 guibg=" . guibg . " ctermfg=3 ctermbg=" . ctermbg - execute "highlight GitGutterDeleteDefault guifg=#ff2222 guibg=" . guibg . " ctermfg=1 ctermbg=" . ctermbg - highlight default link GitGutterChangeDeleteDefault GitGutterChangeDefault - - execute "highlight GitGutterAddInvisible guifg=bg guibg=" . guibg . " ctermfg=" . ctermbg . " ctermbg=" . ctermbg - execute "highlight GitGutterChangeInvisible guifg=bg guibg=" . guibg . " ctermfg=" . ctermbg . " ctermbg=" . ctermbg - execute "highlight GitGutterDeleteInvisible guifg=bg guibg=" . guibg . " ctermfg=" . ctermbg . " ctermbg=" . ctermbg - highlight default link GitGutterChangeDeleteInvisible GitGutterChangeInvisble - - highlight default link GitGutterAdd GitGutterAddDefault - highlight default link GitGutterChange GitGutterChangeDefault - highlight default link GitGutterDelete GitGutterDeleteDefault - highlight default link GitGutterChangeDelete GitGutterChangeDeleteDefault - - " Highlights used for the whole line. - - highlight default link GitGutterAddLine DiffAdd - highlight default link GitGutterChangeLine DiffChange - highlight default link GitGutterDeleteLine DiffDelete - highlight default link GitGutterChangeDeleteLine GitGutterChangeLine -endfunction - -function! gitgutter#highlight#define_signs() abort - sign define GitGutterLineAdded - sign define GitGutterLineModified - sign define GitGutterLineRemoved - sign define GitGutterLineRemovedFirstLine - sign define GitGutterLineModifiedRemoved - sign define GitGutterDummy - - call gitgutter#highlight#define_sign_text() - call gitgutter#highlight#define_sign_text_highlights() - call gitgutter#highlight#define_sign_line_highlights() -endfunction - -function! gitgutter#highlight#define_sign_text() abort - execute "sign define GitGutterLineAdded text=" . g:gitgutter_sign_added - execute "sign define GitGutterLineModified text=" . g:gitgutter_sign_modified - execute "sign define GitGutterLineRemoved text=" . g:gitgutter_sign_removed - execute "sign define GitGutterLineRemovedFirstLine text=" . g:gitgutter_sign_removed_first_line - execute "sign define GitGutterLineModifiedRemoved text=" . g:gitgutter_sign_modified_removed -endfunction - -function! gitgutter#highlight#define_sign_text_highlights() abort - " Once a sign's text attribute has been defined, it cannot be undefined or - " set to an empty value. So to make signs' text disappear (when toggling - " off or disabling) we make them invisible by setting their foreground colours - " to the background's. - if g:gitgutter_signs - sign define GitGutterLineAdded texthl=GitGutterAdd - sign define GitGutterLineModified texthl=GitGutterChange - sign define GitGutterLineRemoved texthl=GitGutterDelete - sign define GitGutterLineRemovedFirstLine texthl=GitGutterDelete - sign define GitGutterLineModifiedRemoved texthl=GitGutterChangeDelete - else - sign define GitGutterLineAdded texthl=GitGutterAddInvisible - sign define GitGutterLineModified texthl=GitGutterChangeInvisible - sign define GitGutterLineRemoved texthl=GitGutterDeleteInvisible - sign define GitGutterLineRemovedFirstLine texthl=GitGutterDeleteInvisible - sign define GitGutterLineModifiedRemoved texthl=GitGutterChangeDeleteInvisible - endif -endfunction - -function! gitgutter#highlight#define_sign_line_highlights() abort - if g:gitgutter_highlight_lines - sign define GitGutterLineAdded linehl=GitGutterAddLine - sign define GitGutterLineModified linehl=GitGutterChangeLine - sign define GitGutterLineRemoved linehl=GitGutterDeleteLine - sign define GitGutterLineRemovedFirstLine linehl=GitGutterDeleteLine - sign define GitGutterLineModifiedRemoved linehl=GitGutterChangeDeleteLine - else - sign define GitGutterLineAdded linehl= - sign define GitGutterLineModified linehl= - sign define GitGutterLineRemoved linehl= - sign define GitGutterLineRemovedFirstLine linehl= - sign define GitGutterLineModifiedRemoved linehl= - endif -endfunction - -function! gitgutter#highlight#get_background_colors(group) abort - redir => highlight - silent execute 'silent highlight ' . a:group - redir END - - let link_matches = matchlist(highlight, 'links to \(\S\+\)') - if len(link_matches) > 0 " follow the link - return gitgutter#highlight#get_background_colors(link_matches[1]) - endif - - let ctermbg = gitgutter#highlight#match_highlight(highlight, 'ctermbg=\([0-9A-Za-z]\+\)') - let guibg = gitgutter#highlight#match_highlight(highlight, 'guibg=\([#0-9A-Za-z]\+\)') - return [guibg, ctermbg] -endfunction - -function! gitgutter#highlight#match_highlight(highlight, pattern) abort - let matches = matchlist(a:highlight, a:pattern) - if len(matches) == 0 - return 'NONE' - endif - return matches[1] -endfunction -- cgit v1.2.3