Skip to content

Instantly share code, notes, and snippets.

View qickstarter's full-sized avatar

qickstarter qickstarter

View GitHub Profile
# Polymorphism
class String
add :(value)->
alert "string add #{value}"
class Number
add :(value)->
alert "number add #{value}"
class Array
" カーソル下のgemのrdocを開く
function! OpenYard(...)
let gem = a:1 == "" ? "" : a:1
if gem == ""
call OpenBrowser("http://localhost:8808/")
else
let url = "http://localhost:8808/docs/" . tolower(gem) . "/frames/"
call OpenBrowser(url)
endif
endfunction
下記設定の追加
```vim:vimrc
NeoBundle 'tsukkee/unite-tag'
"------------------------------------
" Unite-tag.vim
"------------------------------------
"{{{
autocmd BufEnter *
\ if empty(&buftype)
_rtags() {
if [ -d ~/.rbenv ]; then
echo "rbenv"
export RUBIES_DIR=`rbenv which ruby | sed -e 's/\/bin\/ruby//'`
else if [ -d ~/.rvm ]
export RUBIES_DIR=`rbenv which ruby | sed -e 's/\/bin\/ruby//'`
fi
ctags -R --sort=yes --exclude=*.js --exclude=log --exclude=.git --langmap=RUBY:.rb $RUBIES_DIR -f ~/tags
}
" keymap"{{{
" Plugin key-mappings.
imap <C-F> <Plug>(neocomplcache_snippets_expand)
smap <C-F> <Plug>(neocomplcache_snippets_expand)
imap <C-U> <Esc>:Unite snippet<CR>
inoremap <expr><C-g> neocomplcache#undo_completion()
au FileType snippet nmap <buffer><Space>e :e #<CR>
" inoremap <expr><C-L> neocomplcache#complete_common_string()
" imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ?
" keymap"{{{
" Plugin key-mappings.
imap <C-F> <Plug>(neocomplcache_snippets_expand)
smap <C-F> <Plug>(neocomplcache_snippets_expand)
imap <C-U> <Esc>:Unite snippet<CR>
inoremap <expr><C-g> neocomplcache#undo_completion()
" inoremap <expr><C-L> neocomplcache#complete_common_string()
" imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ?
" \"\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
Host sqale
User sqale
Port 2222
HostName gateway.sqale.jp
Identityfile ~/.ssh/github_taichouchou
Host heroku
User git
HostName heroku.com
" keymap"{{{
" Plugin key-mappings.
imap <C-F> <Plug>(neocomplcache_snippets_expand)
smap <C-F> <Plug>(neocomplcache_snippets_expand)
imap <C-U> <Esc>:Unite snippet<CR>
inoremap <expr><C-g> neocomplcache#undo_completion()
" inoremap <expr><C-L> neocomplcache#complete_common_string()
if has('conceal')
set conceallevel=2 concealcursor=i
" Rspec
let g:quickrun_config['ruby.rspec'] = {
\ 'type' : 'ruby.rspec',
\ 'command': 'rspec',
\ 'exec': 'bundle exec %c %o %s',
\ 'outputter' : 'rspec_outputter'
\}
let rspec_outputter = quickrun#outputter#buffer#new()
function! rspec_outputter.init(session)
"----------------------------------------
" vim-ref
"----------------------------------------
"{{{
let g:ref_use_vimproc = 1
let g:ref_open = 'split'
let g:ref_cache_dir = expand('~/.Trash')
" PATHを設定する
let g:ref_refe_cmd = expand('~/.vim/ref/ruby-ref1.9.2/refe-1_9_2')