Skip to content

Instantly share code, notes, and snippets.

@anekos
Last active February 15, 2016 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anekos/50baa2423e9139840d7d to your computer and use it in GitHub Desktop.
Save anekos/50baa2423e9139840d7d to your computer and use it in GitHub Desktop.
Long cat is long.
function! s:long_cat (n)
let l:top = copy([
\ ' /\___/\',
\ ' / \',
\ ' | o o |',
\ ' \ # |',
\ ' \ _|_ /',
\ ' / \______',
\ ' / _______ ___ \',
\ ' |_____ \ \__/',
\ ' | \__/'
\ ])
let l:middle = ' | |'
let l:bottom = copy([
\ ' / \',
\ ' / ____ \',
\ ' | / \ |',
\ ' | | | |',
\ ' / | | \',
\ ' \__/ \__/'
\ ])
let l:middles = []
for l:_ in range(1, a:n)
let l:middles = add(l:middles, l:middle)
endfor
return extend(extend(l:top, l:middles), l:bottom)
endfunction
function! s:spawn_longcat (...)
let l:n = get(a:, 1, 20)
call append(line('.'), s:long_cat(l:n))
endfunction
command! -nargs=? LongCat call s:spawn_longcat(<args>)
@anekos
Copy link
Author

anekos commented Feb 15, 2016

Long cat is Long

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment