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
" .vimrc | |
" .vimrc がある時点で nocompatible になってますが一応書いておきます。 | |
set nocompatible | |
set backupdir=~/.vimbackup | |
set shiftwidth=2 | |
" コマンドモードで自動的に半角英数に変換 | |
if has('gui_macvim') |
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
# .tmux.conf の if はどうも頼りないので default-command に全部まとめちゃう | |
# .tmux.conf にこれを書くだけ | |
set-option -g default-command 'which reattach-to-user-namespace > /dev/null 2>&1 && reattach-to-user-namespace -l $SHELL || $SHELL' | |
# オマケ: バックスラッシュで改行できる...! | |
set-option -g default-command \ | |
'which reattach-to-user-namespace > /dev/null 2>&1 && \ |
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
call smartinput#map_to_trigger('i', '<Plug>(smartinput_Tab)', | |
\ '<Tab>', | |
\ '<Tab>') | |
imap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Plug>(smartinput_Tab)" |
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
augroup hlCursorIM | |
autocmd! | |
autocmd ColorScheme,VimEnter * highlight CursorIM guibg=Purple guifg=NONE | |
augroup END |
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
------------------------------------------------------------ | |
/Users/todashuta/.pyenv/versions/2.7.6/bin/pip run on Sun Dec 29 11:39:40 2013 | |
Getting page https://pypi.python.org/simple/sentimental-skk/ | |
URLs to search for versions for sentimental-skk in ./.pyenv/versions/2.7.6/lib/python2.7/site-packages: | |
* https://pypi.python.org/simple/sentimental-skk/ | |
Analyzing links from page https://pypi.python.org/simple/sentimental-skk/ | |
Skipping link https://pypi.python.org/packages/2.5/s/sentimental-skk/sentimental_skk-0.0.100-py2.5.egg#md5=b94011cdad27578bee1fed7ba84898e8 (from https://pypi.python.org/simple/sentimental-skk/); unknown archive format: .egg | |
Skipping link https://pypi.python.org/packages/2.5/s/sentimental-skk/sentimental_skk-0.0.101-py2.5.egg#md5=548304fd0b0e46cb5226367b96795258 (from https://pypi.python.org/simple/sentimental-skk/); unknown archive format: .egg | |
Skipping link https://pypi.python.org/packages/2.5/s/sentimental-skk/sentimental_skk-0.0.102-py2.5.egg#md5=ddc5bf9cfbcd515eabb99975410cfa48 |
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 script でアッカーマン関数 | |
function! s:ack(m, n) | |
if a:m == 0 | |
return a:n + 1 | |
elseif a:n == 0 | |
return s:ack(a:m - 1, 1) | |
else | |
return s:ack(a:m - 1, s:ack(a:m, a:n - 1)) |
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://blog.livedoor.jp/dankogai/archives/50838244.html | |
" ただのたらいまわし関数 | |
function! s:normal_tarai(x, y, z) | |
return a:x <= a:y ? a:y | |
\ : s:normal_tarai(s:normal_tarai(a:x - 1, a:y, a:z), | |
\ s:normal_tarai(a:y - 1, a:z, a:x), | |
\ s:normal_tarai(a:z - 1, a:x, a:y)) |
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
function createCounter() | |
local n = 0 | |
return function() | |
n = n + 1 | |
return n | |
end | |
end | |
counter = createCounter() |
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
#!/usr/bin/env ruby | |
(1..Float::INFINITY).each do |cnt| | |
s = "#{ [*'A'..'Z'].sample(4).join }細胞" | |
if s == 'STAP細胞' | |
puts "#{cnt}回目で#{s}ができました☆" | |
break | |
else | |
puts "#{cnt}回目: #{s}" |
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
" minimal vimrc | |
if &compatible | set nocompatible | endif | |
augroup MyAutoCmd | |
autocmd! | |
augroup END | |
if has('vim_starting') |
OlderNewer