From 37c0222c1eb00d2ea88ca4bf8f732b71d6bcf986 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 7 Oct 2021 17:00:38 +0200 Subject: Fixed errors with git detached head also fixed :help vim-fancy-line --- doc/vim-fancy-line.txt | 22 ++++++++++++++++++++++ doc/vim-recently-used.txt | 22 ---------------------- plugin/vim-fancy-line.vim | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 doc/vim-fancy-line.txt delete mode 100644 doc/vim-recently-used.txt diff --git a/doc/vim-fancy-line.txt b/doc/vim-fancy-line.txt new file mode 100644 index 0000000..f8cb8d6 --- /dev/null +++ b/doc/vim-fancy-line.txt @@ -0,0 +1,22 @@ +*vim-fancy-line.txt* A plugin to make the status and tab line look nicer + +============================================================================== +USAGE INSTRUCTIONS *vim-recently-used-usage* + + +While this plugin does not have any configuration options in Vim right now, +it is necessary to configure the operating system to get the best use out +of it. It is recommend to install powerline-console-fonts and set them in +`/etc/vconsole.conf` so that the linux terminal displays the bars correctly. + + +CONSOLE FONTS + +To test ca console font try this (it will not survive a reboot as long +as it is not copied to vconsole.conf): + +$ setfont /usr/share/kbd/consolefont/ter-powerline-v16n.psf.gz +$ showconsolefont + + +vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/vim-recently-used.txt b/doc/vim-recently-used.txt deleted file mode 100644 index f8cb8d6..0000000 --- a/doc/vim-recently-used.txt +++ /dev/null @@ -1,22 +0,0 @@ -*vim-fancy-line.txt* A plugin to make the status and tab line look nicer - -============================================================================== -USAGE INSTRUCTIONS *vim-recently-used-usage* - - -While this plugin does not have any configuration options in Vim right now, -it is necessary to configure the operating system to get the best use out -of it. It is recommend to install powerline-console-fonts and set them in -`/etc/vconsole.conf` so that the linux terminal displays the bars correctly. - - -CONSOLE FONTS - -To test ca console font try this (it will not survive a reboot as long -as it is not copied to vconsole.conf): - -$ setfont /usr/share/kbd/consolefont/ter-powerline-v16n.psf.gz -$ showconsolefont - - -vim:tw=78:ts=8:ft=help:norl: diff --git a/plugin/vim-fancy-line.vim b/plugin/vim-fancy-line.vim index 9b6ff55..bfa5e1c 100755 --- a/plugin/vim-fancy-line.vim +++ b/plugin/vim-fancy-line.vim @@ -108,8 +108,8 @@ augroup MAX_FANCY_LINE function! UpdateTabline(highlight_group) let l:invert_group = CreateInvertGroup(a:highlight_group) - let l:git_branch = systemlist('git branch --show-current')[0] - let l:git_branch = v:shell_error ? "" : g:status_sym_sep_start . ' ' . g:symbol_branch . ' ' . l:git_branch + let l:git_branch = systemlist('git branch --show-current') + let l:git_branch = (v:shell_error || l:git_branch == []) ? "" : g:status_sym_sep_start . ' ' . g:symbol_branch . ' ' . l:git_branch[0] return '' \ .'%#'.a:highlight_group.'#' -- cgit v1.2.3