This file contains 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
def local(*args) | |
yield *args | |
end | |
x = 100 | |
local 200 do |x| | |
p x #==> 200 | |
end | |
p x #==> 100 (1.9) or 200 (1.8) |
This file contains 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
/* http://d.hatena.ne.jp/yaotti/20090330/1238391711 */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
/* structure inside queue like atoms of a list */ | |
typedef struct atom_t{ |
This file contains 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
" Swap the meanings of ";" and ":" keys. | |
" This swapping is not applied while you inserting text. | |
noremap ; : | |
noremap : ; |
This file contains 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
" c.vim | |
" Syntax Highlight Rule for 'KRDS': stands for KoRe ha DaSai, similar to FIXME | |
" install this by putting it as ~/.vim/after/syntax/c.vim | |
syn keyword cTodo contained TODO FIXME XXX KRDS |
This file contains 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
" ku - An interface for anything | |
" Version: 0.2.2 | |
" Copyright (C) 2008-2009 kana <http://whileimautomaton.net/> | |
" License: MIT license {{{ | |
" Permission is hereby granted, free of charge, to any person obtaining | |
" a copy of this software and associated documentation files (the | |
" "Software"), to deal in the Software without restriction, including | |
" without limitation the rights to use, copy, modify, merge, publish, | |
" distribute, sublicense, and/or sell copies of the Software, and to | |
" permit persons to whom the Software is furnished to do so, subject to |
This file contains 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
edit k | |
append | |
vim: set nrformats=hex number : | |
. | |
write | |
edit | |
setlocal nrformats? number? " ==> nrformats=hex number | |
split | |
setlocal nrformats= | |
%substitute/number/nonumber/ |
This file contains 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
#include <stdio.h> | |
typedef struct Greeter | |
{ | |
struct Greeter (*hello)(const char*); | |
} Greeter; | |
Greeter hello(const char *name); |
This file contains 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 -u NONE -c 'source test.vim' |
This file contains 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
YUKI.N> git clone git://github.com/kana/config.git | |
YUKI.N> cd config | |
YUKI.N> git checkout vim-operator-replace-bug-char-vs-char-case-1 | |
YUKI.N> make PACKAGE_NAME=vim-operator-replace test-a-package | |
TEST: test/vim-operator-replace/basic ... FAILED | |
--- test/vim-operator-replace/basic.expected 2009-09-06 17:57:31.000000000 +0900 | |
+++ test/vim-operator-replace/basic.output 2009-09-06 17:57:07.000000000 +0900 | |
@@ -29,7 +29,9 @@ | |
TEST: getline(1, line('$')) ==> text ... ok | |
TEST: [line('.'), col('.')] ==> [1, 7] ... ok |
This file contains 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
1.065487 | |
0.933179 | |
0.843261 | |
0.705416 |