Skip to content

Instantly share code, notes, and snippets.

View qickstarter's full-sized avatar

qickstarter qickstarter

View GitHub Profile
" 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
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()
" imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ?
" \"\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
" 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() ?
_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
}
下記設定の追加
```vim:vimrc
NeoBundle 'tsukkee/unite-tag'
"------------------------------------
" Unite-tag.vim
"------------------------------------
"{{{
autocmd BufEnter *
\ if empty(&buftype)
" カーソル下の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
# Polymorphism
class String
add :(value)->
alert "string add #{value}"
class Number
add :(value)->
alert "number add #{value}"
class Array
"tags_jumpを使い易くする
"「飛ぶ」
nnoremap tt <C-]>
"「進む」
nnoremap tl :<C-u>tag<CR>
nnoremap tk :<C-u>tn<CR>
nnoremap tj :<C-u>tp<CR>
"「戻る」
nnoremap th :<C-u>pop<CR>
syntax on
let g:colors_name="molokai"
colorscheme molokai