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
| t = Thread.start do | |
| l = '/ - \ |'.split | |
| loop do | |
| c = l.shift | |
| print "\r" | |
| print c | |
| STDOUT.flush | |
| sleep 0.1 | |
| l.push c | |
| end |
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:toggle_bang(cmdline) | |
| " :substituteみたいに引数とコマンドの間に | |
| " 空白がなくても呼ばれたりするものもあるので完璧ではない。 | |
| " そもそも:substituteはbangとらないけど。 | |
| let m = matchlist(a:cmdline, '^\(\s*\)\(\S\+\)\(.*\)') | |
| if empty(m) | return a:cmdline | endif | |
| let [ws, cmd, rest] = m[1:3] | |
| return ws . (cmd[strlen(cmd) - 1] == '!' ? cmd[:-2] : cmd . '!') . rest | |
| 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
| # -*- coding: utf-8 -*- | |
| require 'curses' | |
| def val2aa(wave, val) | |
| wave[(val + 0x8000) * wave.size / 0x10000] | |
| end | |
| def write_wave(counter) | |
| [ | |
| # ['˾_˼ߎ˨-˧H˕ߙ˦˥՟T˺˭'.split(//u), 79], # 文字化けする... |
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
| " You can use ambiguous command. | |
| " Version: 0.2.0 | |
| " Author : thinca <[email protected]> | |
| " Shougo <Shougo.Matsu (at) gmail.com> | |
| " tyru <[email protected]> | |
| " License: Creative Commons Attribution 2.1 Japan License | |
| " <http://creativecommons.org/licenses/by/2.1/jp/deed.en> | |
| " Install: copy to autoload/ambicmd.vim | |
| let s:save_cpo = &cpo |
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
| " <Tab>: completion. | |
| inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : <SID>left_is_keyword() ? "\<C-n>" : "\<Tab>" | |
| function! s:left_is_keyword() "{{{ | |
| let col = col('.') - 1 | |
| return col != 0 && getline('.')[col - 1] =~# '\k' | |
| 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
| function! s:SelectColorScheme() | |
| 30vnew | |
| let files = split(globpath(&rtp, 'colors/*.vim'), "\n") | |
| for idx in range(0, len(files) - 1) | |
| let file = files[idx] | |
| let name = matchstr(file , '\w\+\(\.vim\)\@=') | |
| call setline(idx + 1, name) | |
| endfor |
NewerOlder