This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " ウィンドウ周りのユーティリティ "{{{ | |
| function! s:close_window(winnr) | |
| if winbufnr(a:winnr) !=# -1 | |
| execute a:winnr . 'wincmd w' | |
| execute 'wincmd c' | |
| return 1 | |
| else | |
| return 0 | |
| endif | |
| endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let s:into_doghouse = 1 | |
| if exists('s:into_doghouse') && filereadable($HOME."/.doghouse.vimrc") | |
| try | |
| source $HOME/.doghouse.vimrc | |
| catch | |
| " エラーメッセージの表示 | |
| echohl ErrorMsg | |
| let msg = | |
| \ "an error occurred... starting as debug mode.\n" | |
| \ . "\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! s:update_status() | |
| if ! has('ruby') | |
| return | |
| endif | |
| if ! filereadable(expand('~/.credential.yml')) | |
| echoerr "There are no keys to authenticate." | |
| return | |
| endif | |
| ruby << EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # this is a kidding. | |
| # I often mistype `ls` as `ks`. | |
| # Be sure to install Kyoko's voice before installing this script. | |
| which say > /dev/null && say -v Kyoko "打ち間違えてんじゃねえよカス!" & | |
| ls "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| alphas = %w[ えー びー しー でぃー いー えふ じー えっち あい じぇー けー える えむ えぬ おー ぴー きゅー あーる えす てぃー ゆー ぶい だぶりゅー えっくす わい ずぃー ] | |
| arufas = {} | |
| ('a'..'z').zip(alphas).each{|k,v| arufas[k] = v} | |
| def num2kan(n) | |
| raise if n > 9999 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| # | |
| # main | |
| # | |
| if __FILE__ == $0 | |
| Thread.new do | |
| sleep 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| def test(tsura: 'poyo', yaba: 'poyo') | |
| puts tsura+yaba | |
| end | |
| test #=> poyopoyo | |
| test tsura: 'tsura' #=> tsurapoyo | |
| test yaba: 'yaba' #=> poyoyaba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| def test(tsura: 'poyo', yaba: 'poyo') | |
| puts tsura+yaba | |
| end | |
| test #=> poyopoyo | |
| test tsura: 'tsura' #=> tsurapoyo | |
| test yaba: 'yaba' #=> poyoyaba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " vim-vspec 用コマンド {{{ | |
| command! -nargs=0 Vspec | |
| \ execute 'QuickRun' 'sh' '-src' | |
| \ '''$HOME/.vim/bundle/vim-vspec/bin/vspec $HOME/.vim/bundle/vim-vspec '.expand('%:p').'''' | |
| " }}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " vim-vspec 用コマンド {{{ | |
| command! -nargs=0 Vspec | |
| \ execute 'QuickRun' 'sh' '-src' | |
| \ '''$HOME/.vim/bundle/vim-vspec/bin/vspec $HOME/.vim/bundle/vim-vspec '.expand('%:p').'''' | |
| " }}} |