titlestring
This commit is contained in:
parent
39db6a06ea
commit
ebb0b7b33b
|
@ -48,6 +48,21 @@ set spelllang=en_gb
|
||||||
set dictionary+=/usr/share/dict/brit-a-z.txt,/usr/share/dict/britcaps.txt
|
set dictionary+=/usr/share/dict/brit-a-z.txt,/usr/share/dict/britcaps.txt
|
||||||
set thesaurus+=/usr/share/dict/mthesaur.txt
|
set thesaurus+=/usr/share/dict/mthesaur.txt
|
||||||
|
|
||||||
|
function! GetGitRoot() abort
|
||||||
|
let gitroot=system("git rev-parse --show-toplevel")
|
||||||
|
if gitroot=~?"^fatal"
|
||||||
|
let gitstring = system("echo ${PWD/#$HOME/'~'}") . "/"
|
||||||
|
let gitstring .= expand("%t")
|
||||||
|
else
|
||||||
|
let gitstring = system("echo ${PWD/#$HOME/'~'}") . "/"
|
||||||
|
let gitstring .= expand("%t")
|
||||||
|
let gitstring .= " [ " . system("git branch | grep '*' | cut -d ' ' -f2")
|
||||||
|
let gitstring .= " ] ( " . system('basename "' . gitroot . '"') . " )"
|
||||||
|
endif
|
||||||
|
return gitstring
|
||||||
|
endfunction
|
||||||
|
let &titlestring="%{GetGitRoot()}"
|
||||||
|
set title
|
||||||
|
|
||||||
set tabstop=8
|
set tabstop=8
|
||||||
set softtabstop=2
|
set softtabstop=2
|
||||||
|
|
Loading…
Reference in New Issue