update gutentags in tabline

This commit is contained in:
ManjaroOne666 2018-11-25 22:00:51 +00:00
parent 586c9d83ab
commit 4454698607
1 changed files with 14 additions and 5 deletions

19
vimrc
View File

@ -490,6 +490,7 @@ let g:mta_filetypes = {
nnoremap <silent> <space>gd :tabedit %<CR>:Gdiff<CR> nnoremap <silent> <space>gd :tabedit %<CR>:Gdiff<CR>
nnoremap <silent> <space>gc :Gcommit<CR> nnoremap <silent> <space>gc :Gcommit<CR>
nnoremap <silent> <space>gl :Glog<CR> nnoremap <silent> <space>gl :Glog<CR>
nnoremap <silent> <space>gp :Gpush<CR>:copen<CR>
"}}} "}}}
" #vim-git{{{ " #vim-git{{{
@ -1066,7 +1067,7 @@ nnoremap <space>gD :!clear; echo 'git diff'; git diff<CR>
nnoremap <space>ga :!clear; git add %; git status<CR> nnoremap <space>ga :!clear; git add %; git status<CR>
nnoremap <space>gA :!clear; git add .; git status<CR> nnoremap <space>gA :!clear; git add .; git status<CR>
nnoremap <space>gg :!clear; git add %; git commit -m ''<Left> nnoremap <space>gg :!clear; git add %; git commit -m ''<Left>
nnoremap <space>gp :!clear; echo 'git push'; git push<CR> nnoremap <space>gP :!clear; echo 'git push'; git push<CR>
"}}} "}}}
" netrw {{{ " netrw {{{
@ -1345,7 +1346,7 @@ function! GetStatus(isactive) abort "{{{
" let l:statusline.='%#StatusLineDotActive#' " let l:statusline.='%#StatusLineDotActive#'
let l:statusline.="%{strlen(expand('%:e'))?'.':''}" let l:statusline.="%{strlen(expand('%:e'))?'.':''}"
" let l:statusline.='%#StatusLineExtActive#' " let l:statusline.='%#StatusLineExtActive#'
let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} " let l:statusline.="%{expand('%:e')} "
else else
let l:statusline.='%#StatusLineDirActive# ' let l:statusline.='%#StatusLineDirActive# '
let l:statusline.="%{expand('%:p:h:t')}/" let l:statusline.="%{expand('%:p:h:t')}/"
@ -1356,7 +1357,7 @@ function! GetStatus(isactive) abort "{{{
let l:statusline.='%#StatusLineDotActive#' let l:statusline.='%#StatusLineDotActive#'
let l:statusline.="%{strlen(expand('%:e'))?'.':''}" let l:statusline.="%{strlen(expand('%:e'))?'.':''}"
let l:statusline.='%#StatusLineExtActive#' let l:statusline.='%#StatusLineExtActive#'
let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} " let l:statusline.="%{expand('%:e')} "
endif endif
else else
let l:statusline .= ' %#StatusLineWarning#%r' let l:statusline .= ' %#StatusLineWarning#%r'
@ -1420,6 +1421,8 @@ function! GetStatus(isactive) abort "{{{
let l:statusline .= ' ' . l:separator let l:statusline .= ' ' . l:separator
let l:statusline .= '%#StatusLineWarning#%{gutentags#statusline("", "", "☢")}'
return l:statusline return l:statusline
endfunction endfunction
@ -1553,11 +1556,15 @@ if exists('+showtabline')
endwhile endwhile
let l:customtabline .= '%T%#TabLineFill#%=' let l:customtabline .= '%T%#TabLineFill#%='
if exists('*gutentags#statusline')
let l:customtabline .= '%#TabLineItemSel# %{gutentags#statusline("[ ", " ☢ ] ")}'
endif
let l:customtabline .= '%#TabLineItem# %{getcwd()}% ' let l:customtabline .= '%#TabLineItem# %{getcwd()}% '
if exists("*fugitive#statusline") if exists('*fugitive#statusline')
let l:customtabline .= '%#TabLineItem# %{fugitive#statusline()}% ' let l:customtabline .= '%#TabLineItem# %{fugitive#statusline()}% '
endif endif
if exists("*ObsessionStatus") if exists('*ObsessionStatus')
let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*" let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*"
endif endif
@ -1577,5 +1584,7 @@ if exists('+showtabline')
endif " exists("+showtabline") endif " exists("+showtabline")
"----------------------------------------------------------------------------}}} "----------------------------------------------------------------------------}}}
nnoremap <F11> :sp tags<CR>:%s/^\([^ :]*:\)\=\([^ ]*\).*/syntax keyword Tag \2/<CR>:wq! tags.vim<CR>/^<CR><F12>
nnoremap <F12> :so tags.vim<CR>
" vim: set foldmethod=marker: " vim: set foldmethod=marker: