From 65d117764f89aea6fb44f1aa883c192c427dc2b8 Mon Sep 17 00:00:00 2001 From: Steve Dignam <steve@dignam.xyz> Date: Sun, 9 Oct 2016 23:11:14 -0400 Subject: [PATCH] Added box drawing characters for fortune / cowsay See the following link for more info on box drawing characters: https://en.wikipedia.org/wiki/Box-drawing_character --- autoload/startify/fortune.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/startify/fortune.vim b/autoload/startify/fortune.vim index 77ffd12..e506dbb 100644 --- a/autoload/startify/fortune.vim +++ b/autoload/startify/fortune.vim @@ -119,13 +119,14 @@ endfunction " Function: s:draw_box {{{1 function! s:draw_box(lines) abort let longest_line = max(map(copy(a:lines), 'len(v:val)')) - let topbottom = '*'. repeat('-', longest_line + 2) .'*' - let lines = [topbottom] + let top = '╭'. repeat('─', longest_line + 2) .'╮' + let bottom = '╰'. repeat('─', longest_line + 2) .'╯' + let lines = [top] for l in a:lines let offset = longest_line - len(l) - let lines += ['| '. l . repeat(' ', offset) .' |'] + let lines += ['│ '. l . repeat(' ', offset) .' │'] endfor - let lines += [topbottom] + let lines += [bottom] return lines endfunction