From lightline.vim to my own function