2008-11-01から1ヶ月間の記事一覧

undefined method `require_gem' for main:Object (NoMethodError) と出たら

エラーが出たソースの require_gem となってるところを gem と変更するといいぽい。 自分はubuntuでbiorubyシェルを起動しようとして、この問題に遭遇した。

cytoscape で とりあえず KEGGのIDだけ付いてるネットワークにアトリビュートを追加するスクリプト

$LOAD_PATH << 'gems/1.8/gems/bio-1.2.1/lib' $LOAD_PATH << 'site_ruby/1.8' $LOAD_PATH << 'site_ruby' $LOAD_PATH << '1.8' $LOAD_PATH << '1.8/java' $LOAD_PATH << 'jruby' require 'set' require 'java' require 'bio' include_class 'java.util.Arra…

ubuntuでeasy_install使ってmercurial入れようとする場合

sudo easy_install Mercurial (中略) error: Setup script exited with error: command 'gcc' failed with exit status 1こういうエラー出たら it probably means you don't have the "python-dev" package installed.ってことらしいので sudo aptitude inst…

今日の:h no.4

vim

:h !=# :h ^^

set autochdirしたい場合

vim

macportsで入れる場合なら sudo port install vim +hugeと+hugeしたらうまくいくようだ。 hugeじゃなくてもいいのかもしれんけど、hugeなら確実ぽい。

今日の:h no.3

vim

:h exists :h function :h call :h setlocal :h range() :h append :h line :h let

netrwで現在見ているディレクトリ内にファイルを作成するvimscript

vim

autocmd FileType netrw nnoremap <buffer> <Space>f :<C-u>edit <C-r>%/ id:ka-nachtさんにhttp://lingr.vim-users.jp/で教えて頂きました。多謝。</c-r></c-u></space></buffer>

vimでemacsのtranspose-linesをやるには

vim

ddp でいいのか。

今日の:h no.2

vim

:h helptags :h filetype :h completeopt :h netrw

今日の:h no.0

vim

:h '. :h vimdiff :h ]c :h ]p :h [p :h make :h vimgrep :h copen :h cwin :h fork :h cn :h t_Co :h cursorline :h showmatch :h matchtime :h nocompatible :h showcmd :h changelog :h WinEnter :h WinLeave :h g&

vimで現在行にアンダーラインを引く (気の利いた機能付き)

vim

setlocal cursorline autocmd WinEnter * setlocal cursorline autocmd WinLeave * setlocal nocursorline こうすると、アクティブなウィンドウだけcursorlineが有効になる。 id:ka-nacht さんに教えていただきました。多謝。

今日の:h no.1

vim

:h undolist :h g- :h g+ :h undo-redo :h earlier :h later :h ball :h ip :h ) :h save :h ^ :h * :h # :h H :h '] :h '[ :h '^ :h gi :h ^g :h args :h iminsert :h imsearch :h "% :h ^^ :h yy :h wrap :h path :h find :h v_o :h tw :h expandtab

macでのpython25について

以前のエントリにも書いたがmacportsでpython2.5入れる場合 To fully complete your installation and make python 2.5 the default, please run sudo port install python_select sudo python_select python25 であるのでpython_selectやっとこう。