Skip to content

Instantly share code, notes, and snippets.

@tyru
Created July 22, 2010 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tyru/485386 to your computer and use it in GitHub Desktop.
Save tyru/485386 to your computer and use it in GitHub Desktop.
ドヤが夫.vim
vnew
setlocal bufhidden=hide buftype=nofile noswapfile nobuflisted
let s:doyagao = {'counter': 0, 'save_updatetime': &updatetime, 'bufnr': bufnr('%')}
function! s:doyagao.doya() dict
if self.bufnr !=# bufnr('%')
call self.clear()
return
endif
%delete _
if self.counter ==# 0
append
___ まぁ確かに・・・
/⌒ '' ⌒\
/( ● ) (● )\ Vimを立ち上げたのはお前
/::⌒ , ゝ⌒::\ (⌒)
| `ー=-' | ノ~.レ-r┐、
\ / ノ |.| |
. , ⌒ ´ \  ̄ ´ !〈 ̄`- Lλ_レレ
/ __ ヽ |  ̄`ー‐-‐‐´
. 〃 ,. --ミ ヽ i |/ハ /
ji/  ̄` ヽ |
.
elseif self.counter ==# 1
append
___
/ノ '' ⌒\
/( ● ) (● )\でも、ウガンダの画面まで来れたのは俺のおかげ
/::⌒ , ゝ⌒::\
| ト==ィ' |
_,rーく´\ \,--、 `ー' /
. ,-く ヽ.\ ヽ Y´ / ー ´ !`ー-、
{ -! l _」_ノ‐′/ ヽ | ∧
. ヽ ゙ー'´ ヽ / ヽ i |/ハ
`ゝ、 ノ ノ ヽ |
.
elseif self.counter ==# 2
append
___
/ヽ ''ノ\
/( ● ) (● )\
/::⌒ 、_ゝ⌒::\ (⌒) だろっ?
| - | ノ ~.レ-r┐、
\ / ノ_ |.| |
. , ⌒ ´ \  ̄ ´ !〈 ̄ `-Lλ_レレ
/ __ ヽ |  ̄`ー‐-‐‐´
. 〃 ,. --ミ ヽ i |/ハ /
ji/  ̄` ヽ |
.
else
call self.clear()
return
endif
let self.counter += 1
call feedkeys('h', 'n')
endfunction
function! s:doyagao.clear() dict
if self.bufnr ==# bufnr('%')
close
endif
autocmd! doyagao
let &updatetime = self.save_updatetime
unlet s:doyagao
endfunction
set updatetime=2000
augroup doyagao
autocmd!
autocmd CursorHold * call s:doyagao.doya()
augroup END
doautocmd CursorHold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment