[from now] 2013/12/01 18:20:30

diff --git a/mac/com.googlecode.iterm2.plist b/mac/com.googlecode.iterm2.plist
index 20e65c7..e1c0f57 100644
--- a/mac/com.googlecode.iterm2.plist
+++ b/mac/com.googlecode.iterm2.plist
@@ -521,7 +521,7 @@
 				<real>1</real>
 			</dict>
 			<key>Cursor Type</key>
-			<integer>1</integer>
+			<integer>2</integer>
 			<key>Custom Command</key>
 			<string>Yes</string>
 			<key>Custom Directory</key>
@@ -1108,7 +1108,7 @@
 	<key>SUHasLaunchedBefore</key>
 	<true/>
 	<key>SULastCheckTime</key>
-	<date>2013-11-09T00:28:39Z</date>
+	<date>2013-12-01T07:32:36Z</date>
 	<key>SavePasteHistory</key>
 	<false/>
 	<key>ShowBookmarkName</key>
@@ -1150,6 +1150,6 @@
 	<key>WordCharacters</key>
 	<string>/-+\~_.</string>
 	<key>iTerm Version</key>
-	<string>1.0.0.20130624</string>
+	<string>1.0.0.20131108</string>
 </dict>
 </plist>
diff --git a/vim/.vimrc b/vim/.vimrc
index fc3710e..243c356 100755
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -81,7 +81,6 @@ NeoBundle 'jceb/vim-hier'
 NeoBundle 'yonchu/accelerated-smooth-scroll'
 NeoBundle 'mattn/sonictemplate-vim'
 NeoBundle 'nathanaelkane/vim-indent-guides.git'
-NeoBundle 'tpope/vim-fugitive.git'
 "NeoBundle 'YankRing.vim'
 NeoBundle 'tpope/vim-surround'
 NeoBundle 'goldfeld/vim-seek'
@@ -98,10 +97,6 @@ NeoBundle 'pekepeke/titanium-vim'
 NeoBundle 'osyo-manga/vim-automatic', {
             \     'depends': ['osyo-manga/vim-gift.git']
             \ }
-NeoBundle 'thinca/vim-quickrun.git', {
-      \   'depends': ['Shougo/vimproc', 'Shougo/unite.vim.git', 'osyo-manga/unite-quickfix',
-      \               'osyo-manga/shabadou.vim', 'jceb/vim-hier']
-      \ }
 NeoBundle 'szw/vim-tags', {
       \   'build': {'mac': 'brew install ctags'}
       \ }
@@ -232,6 +227,11 @@ NeoBundle "mjbrownie/html-textobjects"
 " dak, dik,  dav, div
 NeoBundle "vimtaku/vim-textobj-keyvalue"

+NeoBundleLazy 'tpope/vim-fugitive.git'
+NeoBundleLazy 'thinca/vim-quickrun.git', {
+            \   'depends': ['Shougo/vimproc', 'Shougo/unite.vim.git', 'osyo-manga/unite-quickfix',
+            \               'osyo-manga/shabadou.vim', 'jceb/vim-hier']
+            \ }
 if s:is_darwin
   NeoBundleLazy 'modsound/macdict-vim.git', {
         \   'autoload': {'commands': ['MacDict', 'MacDictCWord', 'MacDictEnglish',
@@ -269,6 +269,7 @@ NeoBundleLazy 'Shougo/vim-vcs.git'
 NeoBundleLazy 'Shougo/vinarise.git'
 NeoBundleLazy 'The-NERD-tree'
 NeoBundleLazy 'thinca/vim-singleton.git'
+NeoBundleLazy 'LeafCage/nebula.vim'
 NeoBundleLazy 'osyo-manga/vim-over', {
             \   'commands': ['OverCommandLine']
             \ }
@@ -318,21 +319,11 @@ NeoBundleLazy 'kien/ctrlp.vim', {
       \   }
       \ }
 if has('lua') && ((v:version >= 703 && has('patch885')) || v:version >= 704)
-  NeoBundleLazy 'Shougo/neocomplete.vim', {
-        \   'autoload': {'insert': 1}
-        \ }
+  NeoBundleLazy 'Shougo/neocomplete.vim'
 else
-  NeoBundleLazy 'Shougo/neocomplcache.vim', {
-        \   'autoload': {'insert': 1}
-        \ }
+  NeoBundleLazy 'Shougo/neocomplcache.vim'
 endif
-NeoBundleLazy 'Shougo/neosnippet.vim', {
-      \   'autoload': {
-      \       'commands': ['NeoSnippetEdit', 'NeoSnippetSource'],
-      \       'filetypes': 'snippet',
-      \       'insert': 1,
-      \       'unite_sources': ['snippet', 'neosnippet/user', 'neosnippet/runtime']
-      \ }}
+NeoBundleLazy 'Shougo/neosnippet.vim'
 NeoBundleLazy 'PProvost/vim-ps1', {
       \   'autoload': {
       \       'filetypes': ['ps1']
@@ -378,33 +369,13 @@ NeoBundleLazy 'edsono/vim-matchit', {
       \       'filetypes': ['ruby','eruby'],
       \       'mappings': ['%']
       \ }}
-NeoBundleLazy 'Shougo/unite.vim', {
-      \   'autoload': {'commands': ['Unite', 'UniteWithBufferDir']}
-      \ }
+NeoBundleLazy 'Shougo/unite.vim', {'depends': ['Shougo/vimproc']}
 NeoBundleLazy 'h1mesuke/unite-outline', {
       \   'autoload': {'unite_sources': ['outline']}
       \ }
-NeoBundleLazy 'Shougo/vimfiler', {
-      \   'depends': ['Shougo/unite.vim'],
-      \   'autoload': {
-      \       'commands': ['VimFilerTab', 'VimFiler', 'VimFilerExplorer', 'VimFilerDouble'],
-      \       'mappings': ['<Plug>(vimfiler_switch)'],
-      \       'explorer': 1
-      \ }}
-NeoBundleLazy 'Shougo/vimshell.vim', {
-      \   'depends': 'Shougo/vimproc',
-      \   'autoload': {
-      \       'commands': ['VimShell'],
-      \       'filetypes': ['vimshell']
-      \   }
-      \ }
-NeoBundleLazy 'supermomonga/vimshell-pure.vim', {
-      \   'depends' : 'Shougo/vimshell.vim',
-      \   'autoload': {
-      \       'commands': ['VimShell'],
-      \       'filetypes': ['vimshell']
-      \   }
-      \ }
+NeoBundleLazy 'Shougo/vimfiler', {'depends': ['Shougo/unite.vim']}
+NeoBundleLazy 'Shougo/vimshell.vim', {'depends': ['Shougo/vimproc']}
+NeoBundleLazy 'supermomonga/vimshell-pure.vim', {'depends' : ['Shougo/vimshell.vim']}
 NeoBundleLazy 't9md/vim-quickhl.git', {
       \   'autoload': {'mappings': ['<Plug>(quickhl-toggle)']}
       \ }
@@ -418,9 +389,7 @@ NeoBundleLazy 'vim-scripts/TaskList.vim', {
 NeoBundleLazy 'tsukkee/unite-help.git', {
       \   'autoload': {'unite_sources': ['help']}
       \ }
-NeoBundleLazy 'tyru/open-browser.vim.git', {
-      \   'autoload': {'mappings': ['<Plug>(openbrowser-smart-search)']}
-      \ }
+NeoBundleLazy 'tyru/open-browser.vim.git'
 NeoBundleLazy 'glidenote/octoeditor.vim', {
       \   'autoload': {'commands': ['OctopressNew', 'OctopressList', 'OctopressGrep',
       \                             'OctopressGenerate', 'OctopressDeploy']}
@@ -507,20 +476,17 @@ NeoBundleLazy 'vbnet.vim', {
 NeoBundleLazy 'vim-scripts/copypath.vim.git', {
       \   'autoload': {'commands': ['CopyPath', 'CopyFileName']}
       \ }
-NeoBundleLazy 'kchmck/vim-coffee-script', {
-      \   'autoload': {'filetypes': 'coffee'}
-      \ }
+NeoBundleLazy 'kchmck/vim-coffee-script'
 NeoBundleLazy 'mattn/emmet-vim', {
       \   'autoload': {'filetypes': ['html', 'djangohtml', 'eruby']}
       \ }
 NeoBundleLazy 'davidhalter/jedi-vim.git', {
-      \   'depends': ['mitechie/pyflakes-pathogen'],
-      \   'autoload': {'filetypes': ['python', 'python3', 'djangohtml']},
-      \   'build': {
-      \     'mac': 'pip install jedi',
-      \     'unix': 'pip install jedi'
-      \   }
-      \ }
+            \ 'depends': ['mitechie/pyflakes-pathogen'],
+            \   'build': {
+            \     'mac': 'pip install jedi',
+            \     'unix': 'pip install jedi'
+            \   }
+            \ }
 NeoBundleLazy 'mitechie/pyflakes-pathogen', {
       \   'autoload': {'filetypes': 'python'}
       \ }
@@ -1257,605 +1223,582 @@ let g:indent_guides_start_level = 2
 "autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green
 " }}}

-" vimfiler {{{
-nnoremap <Leader>f :<C-u>VimFiler -split -simple -toggle -winwidth=35 -no-quit<CR>
-let s:hooks = neobundle#get_hooks("vimfiler")
-function! s:hooks.on_source(bundle)
-  let g:vimfiler_as_default_explorer = 1
-  let g:vimfiler_enable_auto_cd = 1
-  if s:is_windows
-    let g:unite_kind_file_use_trashbox = 1
-  endif
-  " mapping for vimfiler
-  nnoremap <C-e> :<C-u>VimFilerDouble<CR>
-  " As IDE Explorer http://www.karakaram.com/vim/vimfiler/
-  "nnoremap <Leader>f :<C-u>VimFiler -split -simple -toggle -winwidth=35 -no-quit<CR>
-  " gitディレクトリにいる場合、そのルートを開く
-  " http://qiita.com/items/39134f75e9360e1e733d
-  function! s:git_root_dir()
-    if(system('git rev-parse --is-inside-work-tree') == "true\n")
-      return ':VimFiler ' . '-split ' . '-simple ' . '-winwidth=35 ' . '-no-quit '
-            \ . system('git rev-parse --show-cdup') . '\<CR>'
-    else
-      echoerr '!!!current directory is outside git working tree!!!'
-    endif
-  endfunction
-  nnoremap <expr><Leader>g <SID>git_root_dir()
-endfunction
-unlet s:hooks
-" }}}
-
-" VimShell {{{
-let s:hooks = neobundle#get_hooks("vimshell")
-function! s:hooks.on_source(bundle)
-  " PATH
-  if has('unix')
-    " 自分用
-    let $PATH = $PATH . ':' . $HOME . '/bin:' . $HOME . '/bin/scripts'
-    " homebrew
-    let $PATH = '/usr/local/bin:' . $PATH
-  endif
-
-  let g:vimshell_user_prompt = 'fnamemodify(getcwd(), ":~")'
-  let g:vimshell_right_prompt = 'vcs#info("(%s)-[%b]", "(%s)-[%b|%a]")'
-  let g:vimshell_enable_smart_case = 1
-
-  if s:is_windows
-    " Display user name on Windows.
-    let g:vimshell_prompt = $USERNAME."% "
-  else
-    " Display user name on Linux.
-    "let g:vimshell_prompt = $USER."% "
-
-    call vimshell#set_execute_file('bmp,jpg,png,gif', 'gexe eog')
-    call vimshell#set_execute_file('mp3,m4a,ogg', 'gexe amarok')
-    let g:vimshell_execute_file_list['zip'] = 'zipinfo'
-    call vimshell#set_execute_file('tgz,gz', 'gzcat')
-    call vimshell#set_execute_file('tbz,bz2', 'bzcat')
-  endif
-
-  let g:vimshell_execute_file_list = {}
-  call vimshell#set_execute_file('txt,vim,c,h,cpp,d,xml,java', 'vim')
-  let g:vimshell_execute_file_list['rb'] = 'ruby'
-  let g:vimshell_execute_file_list['pl'] = 'perl'
-  let g:vimshell_execute_file_list['py'] = 'python'
-  call vimshell#set_execute_file('html,xhtml', 'gexe firefox')
-
-  autocmd MyAutoCmd FileType vimshell
-              \ if ! s:is_windows
-              \| call vimshell#altercmd#define('i', 'iexe')
-              \| call vimshell#altercmd#define('ll', 'ls -l')
-              \| call vimshell#altercmd#define('la', 'ls -a')
-              \| call vimshell#altercmd#define('lla', 'ls -al')
-              \| call vimshell#altercmd#define('lv', 'vim -R')
-              \| call vimshell#altercmd#define('vimfiler', 'vim -c VimFilerDouble')
-              \| call vimshell#altercmd#define('rm', 'rmtrash')
-              \| call vimshell#altercmd#define('s', ':UniteBookmarkAdd .')
-              \| call vimshell#altercmd#define('g', ':Unite bookmark -start-insert')
-              \| call vimshell#altercmd#define('l', ':Unite bookmark')
-              \| call vimshell#hook#add('chpwd', 'my_chpwd', 'g:my_chpwd')
-              \| else
-                  \| call vimshell#altercmd#define('vimfiler', 'gvim -c VimFilerDouble')
-                  \| endif
-
-
-  function! g:my_chpwd(args, context)
-    call vimshell#execute('ls')
-  endfunction
-
-  autocmd MyAutoCmd FileType int-* call s:interactive_settings()
-  function! s:interactive_settings()
-  endfunction
-
-  " history
-  let g:vimshell_max_command_history = 5000000
-  " mapping
-  "nnoremap [Space]s :<C-u>VimShell<CR>
-  autocmd MyAutoCmd FileType vimshell inoremap <C-^> cd<Space>../<CR>
-  autocmd MyAutoCmd FileType vimshell imap <C-l> <Plug>(vimshell_clear)
-endfunction
-unlet s:hooks
-" }}}
-
-" neocomplete {{{
-let s:hooks = neobundle#get_hooks("neocomplete.vim")
-function! s:hooks.on_source(bundle)
-  let g:acp_enableAtStartup = 0
-  let g:neocomplete#enable_smart_case = 1
-  let g:neocomplete#sources#syntax#min_keyword_length = 3
-  let g:neocomplete#enable_at_startup = 1
-  " Define dictionary.
-  let g:neocomplete#sources#dictionary#dictionaries = {
-        \ 'default': '',
-        \ 'vimshell': $HOME . '/.vimshell_hist',
-        \ 'scheme': $HOME . '/.gosh_completions',
-        \ 'coffee': $MY_VIMRUNTIME . '/dict/coffee.dict',
-        \ 'vbs': $MY_VIMRUNTIME . '/dict/vbs.dict',
-        \ 'dosbatch': $MY_VIMRUNTIME . '/dict/dosbatch.dict',
-        \ 'scala': $MY_VIMRUNTIME . '/dict/scala.dict',
-        \ 'ps1': $MY_VIMRUNTIME . '/dict/ps1.dict',
-        \ 'javascript': $MY_VIMRUNTIME . '/dict/wsh.dict'
-        \ }
-endfunction
-unlet s:hooks
-" }}}
-
-" neocomplcache {{{
-let s:hooks = neobundle#get_hooks("neocomplcache.vim")
-function! s:hooks.on_source(bundle)
-  let g:acp_enableAtStartup = 0
-  let g:neocomplcache_enable_smart_case = 1
-  let g:neocomplcache_min_syntax_length = 3
-  let g:neocomplcache_enable_at_startup = 1
-  " Define dictionary.
-  let g:neocomplcache_dictionary_filetype_lists = {
-        \ 'default': '',
-        \ 'vimshell': $HOME.'/.vimshell_hist',
-        \ 'scheme': $HOME.'/.gosh_completions',
-        \ 'coffee': $MY_VIMRUNTIME . '/dict/coffee.dict',
-        \ 'vbs': $MY_VIMRUNTIME . '/dict/vbs.dict',
-        \ 'dosbatch': $MY_VIMRUNTIME . '/dict/dosbatch.dict',
-        \ 'scala': $MY_VIMRUNTIME . '/dict/scala.dict',
-        \ }
-endfunction
-unlet s:hooks
-"augroup MyNeocom
-"autocmd!
-"augroup END
-"" Disable AutoComplPop.
-"let g:acp_enableAtStartup = 0
-"" Auto Start length
-"let g:neocomplcache_auto_completion_start_length = 3
-"" Max list on Popup
-""let g:neocomplcache_max_list = 500
-"" Max filename width
-""let g:neocomplcache_max_filename_width = 30
-"" Caching limit size
-""let g:neocomplcache_caching_limit_file_size = 5500000
-"" Use neocomplcache.
-"let g:neocomplcache_enable_at_startup = 1
-"" Use smartcase.
-"let g:neocomplcache_enable_smart_case = 0
-"" Use camel case completion.
-"let g:neocomplcache_enable_camel_case_completion = 1
-"" Use underbar completion.
-"let g:neocomplcache_enable_underbar_completion = 1
-"" Set minimum syntax keyword length.
-"let g:neocomplcache_min_syntax_length = 3
-"let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
-"" Force Enable
-"let g:neocomplcache_force_overwrite_completefunc = 1
-
-"" Define dictionary.
-"let g:neocomplcache_dictionary_filetype_lists = {
-"\ 'default': '',
-"\ 'vimshell': $HOME.'/.vimshell_hist',
-"\ 'scheme': $HOME.'/.gosh_completions',
-"\ 'coffee': $MY_VIMRUNTIME . '/dict/coffee.dict',
-"\ 'vbs': $MY_VIMRUNTIME . '/dict/vbs.dict',
-"\ 'dosbatch': $MY_VIMRUNTIME . '/dict/dosbatch.dict',
-"\ }
-
-"" Define keyword.
-"if !exists('g:neocomplcache_keyword_patterns')
-"let g:neocomplcache_keyword_patterns = {}
-"endif
-"let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
-
-"" Plugin key-mappings.
-"inoremap <expr><C-g>     neocomplcache#undo_completion()
-"inoremap <expr><C-l>     neocomplcache#complete_common_string()
-
-"" clang_complete 側の設定
-"let g:clang_complete_auto = 0
-
-"" Recommended key-mappings.
-""<C-n>: manual keyword complete
-""inoremap <expr><C-n>  pumvisible() ? "\<C-n>" : neocomplcache#manual_keyword_complete()
-""<CR>: close popup and save indent.
-"inoremap <expr><CR>  neocomplcache#smart_close_popup() . "\<CR>"
-""<TAB>: completion.
-"inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
-""<C-h>, <BS>: close popup and delete backword char.
-"inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
-"inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
-""inoremap <expr><C-y>  neocomplcache#close_popup()
-"inoremap <expr><C-e>  neocomplcache#cancel_popup()
-
-"" AutoComplPop like behavior.
-""let g:neocomplcache_enable_auto_select = 1
-
-"" Shell like behavior(not recommended).
-""set completeopt+=longest
-""let g:neocomplcache_enable_auto_select = 1
-""let g:neocomplcache_disable_auto_complete = 1
-""inoremap <expr><TAB>  pumvisible() ? "\<Down>" : "\<C-x>\<C-u>"
-""inoremap <expr><CR>  neocomplcache#smart_close_popup() . "\<CR>"
-
-"" Enable omni completion.
-"autocmd MyNeocom FileType css setlocal omnifunc=csscomplete#CompleteCSS
-"autocmd MyNeocom FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
-"autocmd MyNeocom FileType javascript,coffee setlocal omnifunc=javascriptcomplete#CompleteJS
-"autocmd MyNeocom FileType python setlocal omnifunc=pythoncomplete#Complete
-"autocmd MyNeocom FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
-
-
-"" Enable heavy omni completion.
-"if !exists('g:neocomplcache_omni_patterns')
-"let g:neocomplcache_omni_patterns = {}
-"endif
-""let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
-""autocmd MyNeocom FileType ruby setlocal omnifunc=rubycomplete#Complete
-"let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
-"let g:neocomplcache_omni_patterns.c = '\%(\.\|->\)\h\w*'
-"let g:neocomplcache_omni_patterns.cpp = '\h\w*\%(\.\|->\)\h\w*\|\h\w*::'
-""ファイル名補完
-"inoremap <expr><C-x><C-f> neocomplcache#manual_filename_complete()
-
-""オムニ補完
-"inoremap <expr><C-x><C-o> &filetype == 'vim' ? "\<C-x><C-v><C-p>" : neocomplcache#manual_filename_complete()
-" }}}
-
-" neosnippet {{{
-let s:hooks = neobundle#get_hooks("neosnippet.vim")
-function! s:hooks.on_source(bundle)
-  " Tell Neosnippet about the other snippets
-  let g:neosnippet#snippets_directory = $HOME . '/.snippets,'
-  " Plugin key-mappings.
-  imap <C-k>     <Plug>(neosnippet_expand_or_jump)
-  smap <C-k>     <Plug>(neosnippet_expand_or_jump)
-  xmap <C-k>     <Plug>(neosnippet_expand_target)
-
-  " For snippet_complete marker.
-  if has('conceal')
-    set conceallevel=2 concealcursor=i
-  endif
-
-  " for unite
-  imap <C-s> <Plug>(neocomplcache_start_unite_snippet)
-endfunction
-unlet s:hooks
-" }}}
-
-" unite.vim {{{
-" カラースキーマプレビュー
-if globpath(&rtp, 'plugin/unite.vim') != ''
-  nnoremap [Space]uc :<C-u>Unite colorscheme -auto-preview<CR>
-endif
-" history/yank
-nnoremap <silent> [Space]uy :<C-u>Unite -no-split history/yank -buffer-name=history/yank<CR>
-" バッファ一覧
-nnoremap <silent> [Space]ub :<C-u>Unite -no-split buffer -auto-preview -buffer-name=buffer<CR>
-" ファイル一覧
-"nnoremap <silent> [Space]uf :<C-u>Unite -no-split -buffer-name=files file<CR>
-" ファイル一覧(再帰)
-nnoremap <silent> [Space]uf :<C-u>Unite -no-split -buffer-name=file_rec/async file_rec/async<CR>
-" ブックマーク
-nnoremap <silent> ,ub :<C-u>Unite -no-split -buffer-name=bookmark -default-action=cd bookmark<CR>
-" grep
-nnoremap <silent> [Space]ug :<C-u>Unite -buffer-name=grep -no-quit -auto-preview grep<CR>
-" outline
-nnoremap <silent> [Space]uo :<C-u>Unite -buffer-name=outline outline<CR>
-" QuickFix
-nnoremap <silent> [Space]uq :<C-u>Unite -buffer-name=QuickFix -no-quit qf<CR>
-" レジスタ一覧
-nnoremap <silent> [Space]ur :<C-u>Unite -buffer-name=register register<CR>
-" 最近使用したファイル一覧
-nnoremap <silent> [Space]um :<C-u>Unite -no-split file_mru -buffer-name=file_mru -auto-preview<CR>
-" 常用セット
-nnoremap <silent> [Space]uu :<C-u>Unite -no-split buffer file_mru<CR>
-" 全部乗せ
-nnoremap <silent> [Space]ua :<C-u>Unite -no-split -buffer-name=files buffer
-      \                              file_mru bookmark file file_rec/async<CR>
-" 検索
-nnoremap <silent> [Space]/ :<C-u>Unite -buffer-name=search line/fast -no-quit<CR>
-" help
-nnoremap <silent> [Space]uh :<C-u>Unite -no-split -buffer-name=help help<CR>
-" NeoBundle
-nnoremap [Space]ui :<C-u>Unite -no-split -no-start-insert -buffer-name=neobundle neobundle/update<CR>
-nnoremap [Space]bs :<C-u>Unite -no-split -buffer-name=neobundle/search neobundle/search<CR>
-" ~/.vim_junk フォルダをgrep
-nnoremap [Space]ujg :<C-u>Unite -no-split -buffer-name=Grep_JunkFile grep:~/.vim_junk/
-
-let s:hooks = neobundle#get_hooks("unite.vim")
-function! s:hooks.on_source(bundle)
-  " start unite in insert mode
-  let g:unite_enable_start_insert = 1
-  " use vimfiler to open directory
-  call unite#custom#default_action("source/bookmark/directory", "vimfiler")
-  call unite#custom#default_action("directory", "vimfiler")
-  call unite#custom#default_action("directory_mru", "vimfiler")
-  "call unite#custom#default_action("file", "tabdrop")
-  autocmd MyAutoCmd FileType unite call s:unite_settings()
-  function! s:unite_settings()
-    nmap <buffer> <Esc> <Plug>(unite_exit)
-    nmap <buffer> <C-n> <Plug>(unite_select_next_line)
-    nmap <buffer> <C-p> <Plug>(unite_select_previous_line)
-    let g:unite_source_menu_menus = {
-          \   "shortcut": {
-          \       "description": "sample unite-menu",
-          \       "command_candidates": [
-          \           ["edit vimrc", "edit $MYVIMRC"],
-          \           ["edit gvimrc", "edit $MYGVIMRC"],
-          \           ["unite-file_mru", "Unite file_mru"],
-          \           ["Unite Beautiful Attack", "Unite -auto-preview colorscheme"],
-          \           ["unite-output:message", "Unite output:message"]
-          \       ]
-          \   }
-          \ }
-    " 垂直に分割
-    "let g:unite_enable_split_vertically = 1
-    " file_mruの最大保存件数
-    let g:unite_source_file_mru_limit = 1000
-    " history/yankの有効化
-    let g:unite_source_history_yank_enable = 1
-    " grep source setting
-    if s:is_windows
-      let g:unite_source_grep_command = 'grep'
-      let g:unite_source_grep_default_opts = '--color'
-      let g:unite_source_grep_max_candidates = 200
-    else
-      let g:unite_source_grep_command = 'ag'
-      let g:unite_source_grep_default_opts = '--nocolor --nogroup'
-      let g:unite_source_grep_recursive_opt = ''
-      let g:unite_source_grep_max_candidates = 200
-    endif
-  endfunction
-endfunction
-unlet s:hooks
-" }}}
-
-" open-browser {{{
-" http://vim-users.jp/2011/08/hack225/
-let s:hooks = neobundle#get_hooks("open-browser.vim")
-function! s:hooks.on_source(bundle)
-  nmap gx <Plug>(openbrowser-smart-search)
-  vmap gx <Plug>(openbrowser-smart-search)
-endfunction
-unlet s:hooks
-" }}}
-
-" vim-powerline {{{
-"let g:Powerline_symbols = 'fancy'
-" }}}
-
-" vim-template {{{
-let s:hooks = neobundle#get_hooks("vim-template")
-function! s:hooks.on_source(bundle)
-  autocmd User plugin-template-loaded call s:template_keywords()
-  function! s:template_keywords()
-    silent! %s/<+DATE+>/\=strftime('%Y-%m-%d')/g
-    silent! %s/<+FILENAME+>/\=expand('%:r')/g
-  endfunction
-  autocmd User plugin-template-loaded
-        \   if search('<+CURSOR+>')
-        \ |   silent! execute 'normal! "_da>'
-        \ | endif
-  let g:template_basedir = $MY_VIMRUNTIME . '/template'
-endfunction
-unlet s:hooks
-" }}}
-
-" sonictemplate-vim {{{
-let g:sonictemplate_vim_template_dir = $MY_VIMRUNTIME . '/template'
-autocmd MyAutoCmd BufNewFile *.rb Template template
-autocmd MyAutoCmd BufNewFile *.ps1 Template template
-autocmd MyAutoCmd BufNewFile *.cmd Template template
-" }}}
-
-" vim-fugitive {{{
-nnoremap [Space]gd :<C-u>Gdiff<Enter>
-nnoremap [Space]gs :<C-u>Gstatus<Enter>
-nnoremap [Space]gl :<C-u>Glog<Enter>
-nnoremap [Space]ga :<C-u>Gwrite<Enter>
-nnoremap [Space]gc :<C-u>Gcommit<Enter>
-nnoremap [Space]gC :<C-u>Git commit --amend<Enter>
-nnoremap [Space]gp :<C-u>Git pull --rebase<Enter>
-nnoremap [Space]gb :<C-u>Gblame<Enter>
-" }}}
-
-" vim-quickrun {{{
-let s:hooks = neobundle#get_hooks("vim-quickrun")
-function! s:hooks.on_source(bundle)
-  "nmap [Space]r <Plug>(quickrun)
-  " quickrunの最終的なコマンドを出力する {{{
-  " http://d.hatena.ne.jp/osyo-manga/searchdiary?word=quickrun
-  let s:hook = {
-        \   "name": "output_command",
-        \   "kind": "hook",
-        \   "config": {
-        \       "enable": 0,
-        \       "log": 0
-        \   }
-        \ }
-
-  function! s:hook.on_ready(session, context)
-    HierClear
-    for command in a:session.commands
-      execute self.config.log ? "echom command" : "echo command"
-    endfor
-  endfunction
-
-  call quickrun#module#register(s:hook, 1)
-  unlet s:hook
-  " }}}
-
-  " TypeScript reference pathを読み込んでコンパイル {{{
-  let s:hook = {
-        \ "name": "typescript_compile",
-        \ "kind": "hook",
-        \ "config": {
-        \       "enable": 0
-        \  }
-        \ }
-  function! s:hook.on_module_loaded(session, context)
-    let references = []
-    for line in readfile(a:session.config.srcfile, '', 15)
-      if line =~ '^///<reference path='
-        "echom 'reference : ' . line[stridx(line, '"') + 1 : -4]
-        if line[stridx(line, '"') + 1 : -4] !~ 'lib.d.ts'
-          call add(references, line[stridx(line, '"') + 1 : -4])
+if neobundle#tap('vimfiler')"{{{
+    call neobundle#config({
+                \ 'augroup': 'vimfiler',
+                \   'autoload': {
+                \       'unite_sources': ['vimfiler_drive', 'vimfiler_execute', 'vimfiler_history',
+                \                         'vimfiler_mask', 'vimfiler_popd', 'vimfiler_sort'],
+                \       'mappings': [['n', '<Plug>(vimfiler_']],
+                \       'commands': [{'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerCurrentDir'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'Read'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFiler'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerBufferDir'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerSimple'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerTab'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'Edit'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerExplorer'},
+                \                    'VimFilerClose',
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerCreate'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerSplit'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'Write'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'VimFilerDouble'},
+                \                    {'complete': 'customlist,vimfiler#complete', 'name': 'Source'}]
+                \ }
+                \ })
+
+    nnoremap <Leader>f :<C-u>VimFiler -split -simple -toggle -winwidth=35 -no-quit<CR>
+    nnoremap <C-e> :<C-u>VimFilerDouble<CR>
+    nnoremap <expr><Leader>g <SID>git_root_dir()
+        " gitディレクトリにいる場合、そのルートを開く
+        " http://qiita.com/items/39134f75e9360e1e733d
+    function! s:git_root_dir()
+        if(system('git rev-parse --is-inside-work-tree') == "true\n")
+            return ':VimFiler ' . '-split ' . '-simple ' . '-winwidth=35 ' . '-no-quit '
+                        \ . system('git rev-parse --show-cdup') . '\<CR>'
+        else
+            echoerr '!!!current directory is outside git working tree!!!'
         endif
-      endif
-    endfor
-    "echom 'exec : %c --nolib %s ' . join(references, ' ') . ' --out %s:p:r.js'
-    let a:session.config.exec = '%c --nolib %s ' . join(references, ' ') . ' --out %s:p:r.js'
-  endfunction
-  call quickrun#module#register(s:hook, 1)
-  unlet s:hook
-  "}}}
-
-  " coffeescript import を読み込んでコンパイル {{{
-  let s:hook = {
-        \ "name": "coffeescript_compile",
-        \ "kind": "hook",
-        \ "config": {
-        \       "enable": 0
-        \  }
-        \ }
-  function! s:hook.on_module_loaded(session, context)
-    let imports = []
-    for line in readfile(a:session.config.srcfile, '', 15)
-      if line =~ '^# import'
-        "echom 'import : ' . line[10 : -2]
-        call add(imports, line[10 : -2])
-      endif
-    endfor
-    "echom 'exec : %c -j %s:p:r.js -cb ' . join(imports, ' ') . ' %s'
-    let a:session.config.exec = '%c -j %s:p:r.js -cb ' . join(imports, ' ') . ' %s'
-  endfunction
-  call quickrun#module#register(s:hook, 1)
-  unlet s:hook
-  "}}}
-
-  " コンパイル後にヘッダ等を追加 {{{
-  let s:hook = {
-        \ "name": "js2cmd",
-        \ "kind": "hook",
-        \ "config": {
-        \       "enable": 0
-        \  }
-        \ }
-  function! s:hook.on_success(session, context)
-    let list = []
-    call add(list, "@if(0)==(0) ECHO OFF")
-    for line in readfile(a:session.config.srcfile, '', 10)
-      if line =~ '^//' || line =~ '^#'
-        if line[3 : 4] =~ 'OP' || line[2 : 3] =~ 'OP'
-          "echom 'option : ' . line[stridx(line, '"') + 1 : -2]
-          if line[stridx(line, '"') + 1 : -2] =~ '^pushd'
-            call add(list, "    pushd \"%~dp0\" > nul")
-            call add(list, "    CScript.exe //NoLogo //E:JScript \"%~f0\" %*")
-            call add(list, "    popd > nul")
-            break
-          else
-            call add(list, "    CScript.exe //NoLogo //E:JScript \"%~f0\" %*")
-            break
-          endif
+    endfunction
+    function! neobundle#tapped.hooks.on_source(bundle)
+        let g:vimfiler_as_default_explorer = 1
+        let g:vimfiler_enable_auto_cd = 1
+        if s:is_windows
+            let g:unite_kind_file_use_trashbox = 1
+        endif
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('vimshell.vim')"{{{
+    call neobundle#config({
+                \ 'augroup': 'vimshell',
+                \ 'autoload': {
+                \   'unite_sources': ['vimshell_external_history', 'vimshell_history',
+                \                     'vimshell_zsh_complete'],
+                \   'mappings': [['n', '<Plug>(vimshell_']],
+                \   'commands': [{'complete': 'customlist,vimshell#complete', 'name': 'VimShell'},
+                \                {'complete': 'customlist,vimshell#complete', 'name': 'VimShellPop'},
+                \                {'complete': 'customlist,vimshell#complete', 'name': 'VimShellCreate'},
+                \                {'complete': 'customlist,vimshell#complete', 'name': 'VimShellCurrentDir'},
+                \                {'complete': 'customlist,vimshell#vimshell_execute_complete', 'name': 'VimShellExecute'},
+                \                {'complete': 'customlist,vimshell#complete', 'name': 'VimShellBufferDir'},
+                \                'VimShellSendString',
+                \                {'complete': 'customlist,vimshell#complete', 'name': 'VimShellTab'},
+                \                {'complete': 'customlist,vimshell#vimshell_execute_complete', 'name': 'VimShellTerminal'},
+                \                {'complete': 'customlist,vimshell#vimshell_execute_complete', 'name': 'VimShellInteractive'},
+                \                {'complete': 'buffer', 'name': 'VimShellSendBuffer'}]
+                \ }
+                \ })
+    function! neobundle#tapped.hooks.on_source(bundle)
+        " PATH
+        if has('unix')
+            " 自分用
+            let $PATH = $PATH . ':' . $HOME . '/bin:' . $HOME . '/bin/scripts'
+            " homebrew
+            let $PATH = '/usr/local/bin:' . $PATH
         endif
-      endif
-    endfor
-    call add(list, "pause")
-    call add(list, "GOTO :EOF")
-    call add(list, "@end")
-    call add(list, "")
-    let inJs = fnamemodify(a:session.config.srcfile, ":p:r") . '.js'
-    let outCmd = fnamemodify(a:session.config.srcfile, ":p:h") . '/_cmd/'
-          \ . fnamemodify(a:session.config.srcfile, ":t:r") .'.cmd'
-    "echom inJs
-    "echom outCmd
-    let utf8List = list + readfile(inJs, 'b')
-    let cp932List = []
-    for line in utf8List
-      "call add(cp932List, iconv(line, "UTF-8", "CP932"))
-      call add(cp932List, iconv(substitute(line, "\n", "\r\n", "",), "UTF-8", "CP932"))
-    endfor
-    if isdirectory(fnamemodify(a:session.config.srcfile, ":p:h") . '/_cmd')
-      call writefile(cp932List, outCmd, 'b')
-      if has('win32') || has('win64')
-        "call {s:system}('del ' . inJs)
-        call {s:system}('unix2dos ' . outCmd)
-      else
-        "call {s:system}('rm ' . inJs)
-        call {s:system}('nkf --windows --overwrite ' . outCmd)
-      endif
-    else
-      echom fnamemodify(a:session.config.srcfile, ":p:h") . '/_cmd' . 'is not found !'
-    endif
-  endfunction
-
-  call quickrun#module#register(s:hook, 1)
-  unlet s:hook
-  " }}}

-  let g:quickrun_config = {}
-  let g:quickrun_config = {
-        \   "_": {
-        \       "hook/output_command/enable": 0,
-        \       "hook/output_command/log": 1,
-        \       "hook/close_unite_quickfix/enable_hook_loaded": 1,
-        \       "hook/unite_quickfix/enable_failure": 1,
-        \       "hook/close_quickfix/enable_exit": 1,
-        \       "hook/close_buffer/enable_failure": 1,
-        \       "hook/close_buffer/enable_empty_data": 1,
-        \       "hook/echo/enable": 1,
-        \       "hook/echo/output_success": "success!!!",
-        \       "hook/echo/output_failure": "failure...",
-        \       "outputter": "multi:buffer:quickfix",
-        \       "outputter/buffer/split": ":botright 18sp",
-        \       "runner": "vimproc",
-        \       "runner/vimproc/updatetime": 40
-        \   },
-        \ "typescript": {
-        \       "commad": "tsc",
-        \       "cmdopt": "--nolib --out",
-        \       "exec"  : "%c %s _lib.ts %o %s:p:r.js",
-        \       "hook/typescript_compile/enable": 1,
-        \       "hook/js2cmd/enable": 1,
-        \       "hook/output_command/log": 1
-        \   },
-        \ "plantuml": {
-        \       "command": "java",
-        \       "cmdopt": "-jar plantuml.jar -tpng",
-        \       "exec": "%c %o %s"
-        \   },
-        \ "blockdiag": {
-        \       "command": "blockdiag",
-        \       "cmdopt": "-Tsvg",
-        \       "exec": "%c %o %s"
-        \   },
-        \ "rst": {
-        \       "command": "make",
-        \       "cmdopt": "html",
-        \       "exec": "%c %o"
-        \ }
-        \ }
-endfunction
-" }}}
+        let g:vimshell_user_prompt = 'fnamemodify(getcwd(), ":~")'
+        let g:vimshell_right_prompt = 'vcs#info("(%s)-[%b]", "(%s)-[%b|%a]")'
+        let g:vimshell_enable_smart_case = 1
+
+        if s:is_windows
+            " Display user name on Windows.
+            let g:vimshell_prompt = $USERNAME."% "
+        else
+            " Display user name on Linux.
+            "let g:vimshell_prompt = $USER."% "
+
+            call vimshell#set_execute_file('bmp,jpg,png,gif', 'gexe eog')
+            call vimshell#set_execute_file('mp3,m4a,ogg', 'gexe amarok')
+            let g:vimshell_execute_file_list['zip'] = 'zipinfo'
+            call vimshell#set_execute_file('tgz,gz', 'gzcat')
+            call vimshell#set_execute_file('tbz,bz2', 'bzcat')
+        endif

-" vim-coffee-script {{{
-let s:hooks = neobundle#get_hooks("vim-coffee-script")
-function! s:hooks.on_source(bundle)
-  let coffee_compile_vert = 1
-  let coffee_make_options = '--bare'
-endfunction
-unlet s:hooks
-" }}}
+        let g:vimshell_execute_file_list = {}
+        call vimshell#set_execute_file('txt,vim,c,h,cpp,d,xml,java', 'vim')
+        let g:vimshell_execute_file_list['rb'] = 'ruby'
+        let g:vimshell_execute_file_list['pl'] = 'perl'
+        let g:vimshell_execute_file_list['py'] = 'python'
+        call vimshell#set_execute_file('html,xhtml', 'gexe firefox')
+
+        autocmd MyAutoCmd FileType vimshell
+                    \ if ! s:is_windows
+                    \| call vimshell#altercmd#define('i', 'iexe')
+                    \| call vimshell#altercmd#define('ll', 'ls -l')
+                    \| call vimshell#altercmd#define('la', 'ls -a')
+                    \| call vimshell#altercmd#define('lla', 'ls -al')
+                    \| call vimshell#altercmd#define('lv', 'vim -R')
+                    \| call vimshell#altercmd#define('vimfiler', 'vim -c VimFilerDouble')
+                    \| call vimshell#altercmd#define('rm', 'rmtrash')
+                    \| call vimshell#altercmd#define('s', ':UniteBookmarkAdd .')
+                    \| call vimshell#altercmd#define('g', ':Unite bookmark -start-insert')
+                    \| call vimshell#altercmd#define('l', ':Unite bookmark')
+                    \| call vimshell#hook#add('chpwd', 'my_chpwd', 'g:my_chpwd')
+                    \| else
+                        \| call vimshell#altercmd#define('vimfiler', 'gvim -c VimFilerDouble')
+                        \| endif
+
+
+        function! g:my_chpwd(args, context)
+            call vimshell#execute('ls')
+        endfunction
+
+        autocmd MyAutoCmd FileType int-* call s:interactive_settings()
+        function! s:interactive_settings()
+        endfunction
+
+        " history
+        let g:vimshell_max_command_history = 5000000
+        " mapping
+        "nnoremap [Space]s :<C-u>VimShell<CR>
+        autocmd MyAutoCmd FileType vimshell inoremap <C-^> cd<Space>../<CR>
+        autocmd MyAutoCmd FileType vimshell imap <C-l> <Plug>(vimshell_clear)
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('vimshell-pure.vim')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'on_source': ['vimshell.vim']
+                \ }
+                \ })
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('neocomplete.vim')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'insert': 1,
+                \   'unite_sources': ['file_include', 'neocomplete'],
+                \   'mappings': [['i', '<Plug>(neocomplete_start_']],
+                \   'commands': ['NeoCompleteAutoCompletionLength',
+                \                {'complete': 'buffer', 'name': 'NeoCompleteIncludeMakeCache'},
+                \                'NeoCompleteClean', 'NeoCompleteUnlock',
+                \                {'complete': 'customlist,neocomplete#filetype_complete', 'name': 'NeoCompleteSyntaxMakeCache'},
+                \                'NeoCompleteTagMakeCache', 'NeoCompleteEnable',
+                \                {'complete': 'customlist,neocomplete#filetype_complete', 'name': 'NeoCompleteDictionaryMakeCache'},
+                \                {'complete': 'buffer', 'name': 'NeoCompleteVimMakeCache'},
+                \                'NeoCompleteLock', 'NeoCompleteDisable', 'NeoCompleteToggle',
+                \                {'complete': 'filetype', 'name': 'NeoCompleteSetFileType'},
+                \                {'complete': 'file', 'name': 'NeoCompleteBufferMakeCache'}]
+                \ }
+                \ })
+    function! neobundle#tapped.hooks.on_source(bundle)
+        let g:acp_enableAtStartup = 0
+        let g:neocomplete#enable_smart_case = 1
+        let g:neocomplete#sources#syntax#min_keyword_length = 3
+        let g:neocomplete#enable_at_startup = 1
+        " Define dictionary.
+        let g:neocomplete#sources#dictionary#dictionaries = {
+                    \ 'default': '',
+                    \ 'vimshell': $HOME . '/.vimshell_hist',
+                    \ 'scheme': $HOME . '/.gosh_completions',
+                    \ 'coffee': $MY_VIMRUNTIME . '/dict/coffee.dict',
+                    \ 'vbs': $MY_VIMRUNTIME . '/dict/vbs.dict',
+                    \ 'dosbatch': $MY_VIMRUNTIME . '/dict/dosbatch.dict',
+                    \ 'scala': $MY_VIMRUNTIME . '/dict/scala.dict',
+                    \ 'ps1': $MY_VIMRUNTIME . '/dict/ps1.dict',
+                    \ 'javascript': $MY_VIMRUNTIME . '/dict/wsh.dict'
+                    \ }
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('neosnippet.vim')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'insert': 1,
+                \   'unite_sources': ['neosnippet_file', 'snippet', 'snippet_target'],
+                \   'mappings': [['sxi', '<Plug>(neosnippet_']],
+                \   'commands': [{'complete': 'file', 'name': 'NeoSnippetSource'},
+                \                {'complete': 'customlist,neosnippet#commands#_filetype_complete', 'name': 'NeoSnippetMakeCache'},
+                \                {'complete': 'customlist,neosnippet#commands#_edit_complete', 'name': 'NeoSnippetEdit'}]
+                \ }
+                \ })
+
+    " Plugin key-mappings.
+    imap <C-k>     <Plug>(neosnippet_expand_or_jump)
+    smap <C-k>     <Plug>(neosnippet_expand_or_jump)
+    xmap <C-k>     <Plug>(neosnippet_expand_target)
+    function! neobundle#tapped.hooks.on_source(bundle)
+        " Tell Neosnippet about the other snippets
+        let g:neosnippet#snippets_directory = $HOME . '/.snippets,'
+
+        " For snippet_complete marker.
+        if has('conceal')
+            set conceallevel=2 concealcursor=i
+        endif

-" jedi-vim {{{
-let s:hooks = neobundle#get_hooks("jedi-vim")
-function! s:hooks.on_source(bundle)
-  let g:jedi#auto_initialization = 1
-  let g:jedi#auto_vim_configuration = 0
-  let g:jedi#goto_assignments_command = '<Leader>G'
-  let g:jedi#popup_select_first = 0
-  let g:jedi#rename_command = '<Leader>R'
-  let g:jedi#show_call_signatures = 1
-  "let g:jedi#popup_on_dot = 1
-  autocmd MyAutoCmd FileType python let b:did_ftplugin = 1
-endfunction
-unlet s:hooks
-" }}}
+        " for unite
+        imap <C-s> <Plug>(neocomplcache_start_unite_snippet)
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('unite.vim')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'name': 'Unite', 'complete': 'customlist,unite#complete_source'
+                \ }
+                \ })
+    " カラースキーマプレビュー
+    nnoremap [Space]uc :<C-u>Unite colorscheme -auto-preview<CR>
+    " history/yank
+    nnoremap <silent> [Space]uy :<C-u>Unite -no-split history/yank -buffer-name=history/yank<CR>
+    " バッファ一覧
+    nnoremap <silent> [Space]ub :<C-u>Unite -no-split buffer -auto-preview -buffer-name=buffer<CR>
+    " ファイル一覧
+    "nnoremap <silent> [Space]uf :<C-u>Unite -no-split -buffer-name=files file<CR>
+    " ファイル一覧(再帰)
+    nnoremap <silent> [Space]uf :<C-u>Unite -no-split -buffer-name=file_rec/async file_rec/async<CR>
+    " ブックマーク
+    nnoremap <silent> ,ub :<C-u>Unite -no-split -buffer-name=bookmark -default-action=cd bookmark<CR>
+    " grep
+    nnoremap <silent> [Space]ug :<C-u>Unite -buffer-name=grep -no-quit -auto-preview grep<CR>
+    " outline
+    nnoremap <silent> [Space]uo :<C-u>Unite -buffer-name=outline outline<CR>
+    " QuickFix
+    nnoremap <silent> [Space]uq :<C-u>Unite -buffer-name=QuickFix -no-quit qf<CR>
+    " レジスタ一覧
+    nnoremap <silent> [Space]ur :<C-u>Unite -buffer-name=register register<CR>
+    " 最近使用したファイル一覧
+    nnoremap <silent> [Space]um :<C-u>Unite -no-split file_mru -buffer-name=file_mru -auto-preview<CR>
+    " 常用セット
+    nnoremap <silent> [Space]uu :<C-u>Unite -no-split buffer file_mru<CR>
+    " 全部乗せ
+    nnoremap <silent> [Space]ua :<C-u>Unite -no-split -buffer-name=files buffer
+                \                              file_mru bookmark file file_rec/async<CR>
+    " 検索
+    nnoremap <silent> [Space]/ :<C-u>Unite -buffer-name=search line/fast -no-quit<CR>
+    " help
+    nnoremap <silent> [Space]uh :<C-u>Unite -no-split -buffer-name=help help<CR>
+    " NeoBundle
+    nnoremap [Space]ui :<C-u>Unite -no-split -no-start-insert -buffer-name=neobundle neobundle/update<CR>
+    nnoremap [Space]bs :<C-u>Unite -no-split -buffer-name=neobundle/search neobundle/search<CR>
+    " ~/.vim_junk フォルダをgrep
+    nnoremap [Space]ujg :<C-u>Unite -no-split -buffer-name=Grep_JunkFile grep:~/.vim_junk/
+
+    function! neobundle#tapped.hooks.on_source(bundle)
+        " start unite in insert mode
+        let g:unite_enable_start_insert = 1
+        " use vimfiler to open directory
+        call unite#custom#default_action("source/bookmark/directory", "vimfiler")
+        call unite#custom#default_action("directory", "vimfiler")
+        call unite#custom#default_action("directory_mru", "vimfiler")
+        "call unite#custom#default_action("file", "tabdrop")
+        autocmd MyAutoCmd FileType unite call s:unite_settings()
+        function! s:unite_settings()
+            nmap <buffer> <Esc> <Plug>(unite_exit)
+            nmap <buffer> <C-n> <Plug>(unite_select_next_line)
+            nmap <buffer> <C-p> <Plug>(unite_select_previous_line)
+            let g:unite_source_menu_menus = {
+                        \   "shortcut": {
+                        \       "description": "sample unite-menu",
+                        \       "command_candidates": [
+                        \           ["edit vimrc", "edit $MYVIMRC"],
+                        \           ["edit gvimrc", "edit $MYGVIMRC"],
+                        \           ["unite-file_mru", "Unite file_mru"],
+                        \           ["Unite Beautiful Attack", "Unite -auto-preview colorscheme"],
+                        \           ["unite-output:message", "Unite output:message"]
+                        \       ]
+                        \   }
+                        \ }
+            " 垂直に分割
+            "let g:unite_enable_split_vertically = 1
+            " file_mruの最大保存件数
+            let g:unite_source_file_mru_limit = 1000
+            " history/yankの有効化
+            let g:unite_source_history_yank_enable = 1
+            " grep source setting
+            if s:is_windows
+                let g:unite_source_grep_command = 'grep'
+                let g:unite_source_grep_default_opts = '--color'
+                let g:unite_source_grep_max_candidates = 200
+            else
+                let g:unite_source_grep_command = 'ag'
+                let g:unite_source_grep_default_opts = '--nocolor --nogroup'
+                let g:unite_source_grep_recursive_opt = ''
+                let g:unite_source_grep_max_candidates = 200
+            endif
+        endfunction
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('open-browser.vim')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'mappings': [['sxn', '<Plug>(openbrowser-']],
+                \   'commands': [{'complete': 'customlist,openbrowser#_cmd_complete', 'name': 'OpenBrowserSearch'},
+                \                {'complete': 'customlist,openbrowser#_cmd_complete', 'name': 'OpenBrowserSmartSearch'},
+                \                'OpenBrowser']
+                \ }
+                \ })
+    function! neobundle#tapped.hooks.on_source(bundle)
+        " http://vim-users.jp/2011/08/hack225/
+        nmap gx <Plug>(openbrowser-smart-search)
+        vmap gx <Plug>(openbrowser-smart-search)
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('sonictemplate-vim')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'unite_sources': ['sonictemplate'],
+                \   'mappings': [['in', '<Plug>(sonictemplate']],
+                \   'commands': ['Template']
+                \ }
+                \ })
+    autocmd MyAutoCmd BufNewFile *.rb Template template
+    autocmd MyAutoCmd BufNewFile *.ps1 Template template
+    autocmd MyAutoCmd BufNewFile *.cmd Template template
+    function! neobundle#tapped.hooks.on_source(bundle)
+        let g:sonictemplate_vim_template_dir = $MY_VIMRUNTIME . '/template'
+    endfunction
+endif"}}}
+
+if neobundle#tap('vim-fugitive') "{{{"{{{
+    call neobundle#config({
+                \ 'augroup': 'fugitive',
+                \ 'autoload': {
+                \   'commands': ['Git', 'Gcd', 'Glcd', 'Gstatus', 'Gcommit', 'Ggrep', 'Glgrep',
+                \                'Glog', 'Gllog', 'Gedit', 'Gsplit', 'Gvsplit', 'Gtabedit',
+                \                'Gpedit', 'Gread', 'Gwrite', 'Gwq', 'Gdiff', 'Gsdiff', 'Gvdiff',
+                \                'Gmove', 'Gremove', 'Gblame', 'Gbrowse']
+                \ }
+                \ })
+
+    nnoremap [Space]gd :<C-u>Gdiff<Enter>
+    nnoremap [Space]gs :<C-u>Gstatus<Enter>
+    nnoremap [Space]gl :<C-u>Glog<Enter>
+    nnoremap [Space]ga :<C-u>Gwrite<Enter>
+    nnoremap [Space]gc :<C-u>Gcommit<Enter>
+    nnoremap [Space]gC :<C-u>Git commit --amend<Enter>
+    nnoremap [Space]gp :<C-u>Git pull --rebase<Enter>
+    nnoremap [Space]gb :<C-u>Gblame<Enter>
+    function! neobundle#tapped.hooks.on_post_source(bundle)
+        doautoall fugitive BufNewFile
+    endfunction
+endif"}}}
+
+if neobundle#tap('vim-quickrun')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'mappings': [['sxn', '<Plug>(quickrun']],
+                \   'commands': [{'complete': 'customlist,quickrun#complete', 'name': 'QuickRun'}]
+                \ }
+                \ })
+    nnoremap <Leader>r <Plug>(quickrun)
+    function! neobundle#tapped.hooks.on_source(bundle)
+        " quickrunの最終的なコマンドを出力する"{{{
+        " http://d.hatena.ne.jp/osyo-manga/searchdiary?word=quickrun
+        let s:hook = {
+                    \   "name": "output_command",
+                    \   "kind": "hook",
+                    \   "config": {
+                    \       "enable": 0,
+                    \       "log": 0
+                    \   }
+                    \ }
+
+        function! s:hook.on_ready(session, context)
+            HierClear
+            for command in a:session.commands
+                execute self.config.log ? "echom command" : "echo command"
+            endfor
+        endfunction
+
+        call quickrun#module#register(s:hook, 1)
+        unlet s:hook"}}}
+
+        " TypeScript reference pathを読み込んでコンパイル"{{{
+        let s:hook = {
+                    \ "name": "typescript_compile",
+                    \ "kind": "hook",
+                    \ "config": {
+                    \       "enable": 0
+                    \  }
+                    \ }
+        function! s:hook.on_module_loaded(session, context)
+            let references = []
+            for line in readfile(a:session.config.srcfile, '', 15)
+                if line =~ '^///<reference path='
+                    "echom 'reference : ' . line[stridx(line, '"') + 1 : -4]
+                    if line[stridx(line, '"') + 1 : -4] !~ 'lib.d.ts'
+                        call add(references, line[stridx(line, '"') + 1 : -4])
+                    endif
+                endif
+            endfor
+            "echom 'exec : %c --nolib %s ' . join(references, ' ') . ' --out %s:p:r.js'
+            let a:session.config.exec = '%c --nolib %s ' . join(references, ' ') . ' --out %s:p:r.js'
+        endfunction
+        call quickrun#module#register(s:hook, 1)
+        unlet s:hook"}}}
+
+        " coffeescript import を読み込んでコンパイル"{{{
+        let s:hook = {
+                    \ "name": "coffeescript_compile",
+                    \ "kind": "hook",
+                    \ "config": {
+                    \       "enable": 0
+                    \  }
+                    \ }
+        function! s:hook.on_module_loaded(session, context)
+            let imports = []
+            for line in readfile(a:session.config.srcfile, '', 15)
+                if line =~ '^# import'
+                    "echom 'import : ' . line[10 : -2]
+                    call add(imports, line[10 : -2])
+                endif
+            endfor
+            "echom 'exec : %c -j %s:p:r.js -cb ' . join(imports, ' ') . ' %s'
+            let a:session.config.exec = '%c -j %s:p:r.js -cb ' . join(imports, ' ') . ' %s'
+        endfunction
+        call quickrun#module#register(s:hook, 1)
+        unlet s:hook"}}}
+
+        " コンパイル後にヘッダ等を追加"{{{
+        let s:hook = {
+                    \ "name": "js2cmd",
+                    \ "kind": "hook",
+                    \ "config": {
+                    \       "enable": 0
+                    \  }
+                    \ }
+        function! s:hook.on_success(session, context)
+            let list = []
+            call add(list, "@if(0)==(0) ECHO OFF")
+            for line in readfile(a:session.config.srcfile, '', 10)
+                if line =~ '^//' || line =~ '^#'
+                    if line[3 : 4] =~ 'OP' || line[2 : 3] =~ 'OP'
+                        "echom 'option : ' . line[stridx(line, '"') + 1 : -2]
+                        if line[stridx(line, '"') + 1 : -2] =~ '^pushd'
+                            call add(list, "    pushd \"%~dp0\" > nul")
+                            call add(list, "    CScript.exe //NoLogo //E:JScript \"%~f0\" %*")
+                            call add(list, "    popd > nul")
+                            break
+                        else
+                            call add(list, "    CScript.exe //NoLogo //E:JScript \"%~f0\" %*")
+                            break
+                        endif
+                    endif
+                endif
+            endfor
+            call add(list, "pause")
+            call add(list, "GOTO :EOF")
+            call add(list, "@end")
+            call add(list, "")
+            let inJs = fnamemodify(a:session.config.srcfile, ":p:r") . '.js'
+            let outCmd = fnamemodify(a:session.config.srcfile, ":p:h") . '/_cmd/'
+                        \ . fnamemodify(a:session.config.srcfile, ":t:r") .'.cmd'
+            "echom inJs
+            "echom outCmd
+            let utf8List = list + readfile(inJs, 'b')
+            let cp932List = []
+            for line in utf8List
+                "call add(cp932List, iconv(line, "UTF-8", "CP932"))
+                call add(cp932List, iconv(substitute(line, "\n", "\r\n", "",), "UTF-8", "CP932"))
+            endfor
+            if isdirectory(fnamemodify(a:session.config.srcfile, ":p:h") . '/_cmd')
+                call writefile(cp932List, outCmd, 'b')
+                if has('win32') || has('win64')
+                    "call {s:system}('del ' . inJs)
+                    call {s:system}('unix2dos ' . outCmd)
+                else
+                    "call {s:system}('rm ' . inJs)
+                    call {s:system}('nkf --windows --overwrite ' . outCmd)
+                endif
+            else
+                echom fnamemodify(a:session.config.srcfile, ":p:h") . '/_cmd' . 'is not found !'
+            endif
+        endfunction
+
+        call quickrun#module#register(s:hook, 1)
+        unlet s:hook"}}}
+
+        let g:quickrun_config = {}
+        let g:quickrun_config = {
+                    \   "_": {
+                    \       "hook/output_command/enable": 0,
+                    \       "hook/output_command/log": 1,
+                    \       "hook/close_unite_quickfix/enable_hook_loaded": 1,
+                    \       "hook/unite_quickfix/enable_failure": 1,
+                    \       "hook/close_quickfix/enable_exit": 1,
+                    \       "hook/close_buffer/enable_failure": 1,
+                    \       "hook/close_buffer/enable_empty_data": 1,
+                    \       "hook/echo/enable": 1,
+                    \       "hook/echo/output_success": "success!!!",
+                    \       "hook/echo/output_failure": "failure...",
+                    \       "outputter": "multi:buffer:quickfix",
+                    \       "outputter/buffer/split": ":botright 18sp",
+                    \       "runner": "vimproc",
+                    \       "runner/vimproc/updatetime": 40
+                    \   },
+                    \ "typescript": {
+                    \       "commad": "tsc",
+                    \       "cmdopt": "--nolib --out",
+                    \       "exec"  : "%c %s _lib.ts %o %s:p:r.js",
+                    \       "hook/typescript_compile/enable": 1,
+                    \       "hook/js2cmd/enable": 1,
+                    \       "hook/output_command/log": 1
+                    \   },
+                    \ "plantuml": {
+                    \       "command": "java",
+                    \       "cmdopt": "-jar plantuml.jar -tpng",
+                    \       "exec": "%c %o %s"
+                    \   },
+                    \ "blockdiag": {
+                    \       "command": "blockdiag",
+                    \       "cmdopt": "-Tsvg",
+                    \       "exec": "%c %o %s"
+                    \   },
+                    \ "rst": {
+                    \       "command": "make",
+                    \       "cmdopt": "html",
+                    \       "exec": "%c %o"
+                    \ }
+                    \ }
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('vim-coffee-script')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'filetypes': ['coffee']
+                \ }
+                \ })
+    function! neobundle#tapped.hooks.on_source(bundle)
+        let coffee_compile_vert = 1
+        let coffee_make_options = '--bare'
+    endfunction
+    call neobundle#untap()
+endif"}}}
+
+if neobundle#tap('jedi-vim')"{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'commands': [{'complete': 'custom,jedi#py_import_completions', 'name': 'Pyimport'},
+                \                'Python'],
+                \   'filetypes': ['python', 'python3']
+                \ }
+                \ })
+    function! neobundle#tapped.hooks.on_source(bundle)
+        let g:jedi#auto_initialization = 1
+        let g:jedi#auto_vim_configuration = 0
+        let g:jedi#goto_assignments_command = '<Leader>G'
+        let g:jedi#popup_select_first = 0
+        let g:jedi#rename_command = '<Leader>R'
+        let g:jedi#show_call_signatures = 1
+        "let g:jedi#popup_on_dot = 1
+        autocmd MyAutoCmd FileType python let b:did_ftplugin = 1
+    endfunction
+endif"}}}

 " ag.vim {{{
 let s:hooks = neobundle#get_hooks("ag.vim")
@@ -2226,7 +2169,7 @@ endif
 let s:hooks = neobundle#get_hooks("vim-golang")
 function! s:hooks.on_source(bundle)
   set rtp+=$GOROOT/misc/vim
-  exe "set rtp+=".globpath($GOPATH, "src/github.com/nsf/gocode/vim")
+  exe "set rtp+=" . globpath($GOPATH, "src/github.com/nsf/gocode/vim")
   setl completeopt=menu,preview
   " golint
   exe "set rtp+=" . globpath($GOPATH, "src/github.com/golang/lint/misc/vim")
@@ -2255,6 +2198,17 @@ nnoremap <silent>g<C-p> :<C-u>CtrlPYankRound<CR>
 " vim-over {{{
 nnoremap <silent> <Leader>o :<C-u>OverCommandLine<CR>%s/
 " }}}
+
+if neobundle#tap('nebula.vim') "{{{
+    call neobundle#config({
+                \ 'autoload': {
+                \   'commands': ['NebulaPutLazy', 'NebulaPutFromClipboard', 'NebulaYankOptions',
+                \                'NebulaPutConfig', 'NebulaYankTap']
+                \ }
+                \ })
+endif
+"}}}
+
 "===================================================================================}}}

 "{{{ ========== Language Settings =====================================================