From bc59abdaeadf5c389bbbd833bcab282dc30b98bf Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Sun, 30 Dec 2018 00:03:47 -0600 Subject: [PATCH] Add option to enable showing full path (#2393) --- autoload/SpaceVim.vim | 4 ++++ autoload/SpaceVim/layers/core/statusline.vim | 4 +++- codecov.yml | 8 +++++--- doc/SpaceVim.txt | 3 +++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 56193e024..69cd46732 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -327,6 +327,10 @@ let g:spacevim_enable_cursorline = 1 let g:spacevim_statusline_separator = 'arrow' let g:spacevim_statusline_inactive_separator = 'arrow' +"" +" Enable/Disable showing full path of current buffer on statusline +let g:spacevim_enable_statusline_bfpath = 0 + "" " Define the left section of statusline in active windows. By default: " > diff --git a/autoload/SpaceVim/layers/core/statusline.vim b/autoload/SpaceVim/layers/core/statusline.vim index 1b0a6c55d..49bccdb46 100644 --- a/autoload/SpaceVim/layers/core/statusline.vim +++ b/autoload/SpaceVim/layers/core/statusline.vim @@ -286,8 +286,10 @@ function! s:check_mode() abort endfunction " only when there are more than two buffers have same name. +" show buffer name all the time need +" enable_statusline_bfpath true function! s:buffer_name() abort - if get(b:, '_spacevim_statusline_showbfname', 0) == 1 + if get(b:, '_spacevim_statusline_showbfname', 0) == 1 || g:spacevim_enable_statusline_bfpath return ' ' . bufname('%') else return '' diff --git a/codecov.yml b/codecov.yml index d5c183601..cec7dbcfd 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,10 +5,12 @@ codecov: branch: master coverage: status: + patch: + default: false project: default: false # disable the default status that measures entire project - tests: # declare a new status context "tests" - target: 100% # we always want 100% coverage here - paths: "tests/" # only include coverage in "tests/" folder + api: # declare a new status context "api" + target: 70% # we always want 100% coverage here + paths: "autoload/SpaceVim/api/" # only include coverage in "tests/" folder app: # declare a new status context "app" paths: "!tests/" # remove all files in "tests/" diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 19cd12e29..da704d6f7 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -415,6 +415,9 @@ Set the statusline separators of statusline, default is 'arrow' See more details in: http://spacevim.org/documentation/#statusline + *g:spacevim_enable_statusline_bfpath* +Enable/Disable showing full path of current buffer on statusline + *g:spacevim_statusline_left_sections* Define the left section of statusline in active windows. By default: >