Skip to content

Instantly share code, notes, and snippets.

@mhinz
Created January 15, 2015 15:07
Show Gist options
  • Save mhinz/c4086af7b35780061d9b to your computer and use it in GitHub Desktop.
Save mhinz/c4086af7b35780061d9b to your computer and use it in GitHub Desktop.
function s:filter_header(lines) abort
let longest_line = max(map(copy(a:lines), 'len(v:val)'))
let centered_lines = map(copy(a:lines), 'repeat(" ", (&columns / 2) - (longest_line / 2)) . v:val')
return centered_lines
endfunction
let g:startify_custom_header = s:filter_header(['1', '222', '33333', '4444444'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment