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
| # Polymorphism | |
| class String | |
| add :(value)-> | |
| alert "string add #{value}" | |
| class Number | |
| add :(value)-> | |
| alert "number add #{value}" | |
| class Array |
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
| " カーソル下の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 |
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
| 下記設定の追加 | |
| ```vim:vimrc | |
| NeoBundle 'tsukkee/unite-tag' | |
| "------------------------------------ | |
| " Unite-tag.vim | |
| "------------------------------------ | |
| "{{{ | |
| autocmd BufEnter * | |
| \ if empty(&buftype) |
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
| _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 | |
| } |
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
| " 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() ? |
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
| " 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>" |
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
| Host sqale | |
| User sqale | |
| Port 2222 | |
| HostName gateway.sqale.jp | |
| Identityfile ~/.ssh/github_taichouchou | |
| Host heroku | |
| User git | |
| HostName heroku.com |
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
| " 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 |
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
| " 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) |
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
| "---------------------------------------- | |
| " 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') |