[from now] 2014/08/05 19:21:37

diff --git a/vim/.vimrc b/vim/.vimrc
index 8878a1f..440e138 100755
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -136,7 +136,6 @@ NeoBundle 'Raimondi/delimitMate'
 " NeoBundleLazy 'DrawIt'
 " NeoBundleLazy 'adogear/vim-blockdiag-series'
 " NeoBundleLazy 'alpaca-tc/alpaca_tags', {'depends': 'Shougo/vimproc.vim'}
-" NeoBundleLazy 'basyura/J6uil.vim', {'depends': ['Shougo/vimproc.vim', 'mattn/webapi-vim']}
 " NeoBundleLazy 'basyura/unite-rails'
 " NeoBundleLazy 'derekwyatt/vim-scala', {'build': {'mac': 'brew install scala sbt'}}
 " NeoBundleLazy 'h1mesuke/unite-outline'
@@ -175,6 +174,7 @@ NeoBundleLazy 'Shougo/vimfiler.vim'
 NeoBundleLazy 'Shougo/vimshell.vim', {'depends': 'Shougo/vimproc.vim'}
 NeoBundleLazy 'Shougo/vinarise.vim'
 NeoBundleLazy 'aklt/plantuml-syntax'
+NeoBundleLazy 'basyura/J6uil.vim', {'depends': ['Shougo/vimproc.vim', 'mattn/webapi-vim']}
 NeoBundleLazy 'basyura/unite-firefox-bookmarks', {'depends': ['tyru/open-browser.vim', 'mattn/webapi-vim']}
 NeoBundleLazy 'cd01/poshcomplete-vim'
 NeoBundleLazy 'choplin/unite-vim_hacks'
@@ -517,26 +517,26 @@ colorscheme monokai

 highlight Search ctermbg=88

-" hilight cursorline, cursorcolumn {{{
+" hilight cursorline, cursorcolumn "{{{
 " http://d.hatena.ne.jp/thinca/20090530/1243615055
 au MyAutoCmd CursorMoved,CursorMovedI * call s:auto_cursorline('CursorMoved')
 au MyAutoCmd CursorHold,CursorHoldI * call s:auto_cursorline('CursorHold')
-au MyAutoCmd WinEnter * call s:auto_cursorline('WinEnter')
+au MyAutoCmd WinEnter,BufEnter * call s:auto_cursorline('WinBufEnter')
 au MyAutoCmd WinLeave * call s:auto_cursorline('WinLeave')

 let s:cursorline_lock = 0
 function! s:auto_cursorline(event)
-  if a:event ==# 'WinEnter'
-    echo 'WinEnter'.s:cursorline_lock
+  if a:event ==# 'WinBufEnter'
+    " echo 'WinEnter'.s:cursorline_lock
     setlocal cursorline
     setlocal cursorcolumn
     let s:cursorline_lock = 2
   elseif a:event ==# 'WinLeave'
-    echo 'WinLeave'.s:cursorline_lock
+    " echo 'WinLeave'.s:cursorline_lock
     setlocal nocursorline
     setlocal nocursorcolumn
   elseif a:event ==# 'CursorMoved'
-    echo 'CursorMoved'.s:cursorline_lock
+    " echo 'CursorMoved'.s:cursorline_lock
     if s:cursorline_lock
       if 1 < s:cursorline_lock
         let s:cursorline_lock = 1
@@ -547,14 +547,15 @@ function! s:auto_cursorline(event)
       endif
     endif
   elseif a:event ==# 'CursorHold'
-    echo 'CursorHold'.s:cursorline_lock
+    " echo 'CursorHold'.s:cursorline_lock
     if &updatetime >= 4000
       setlocal cursorline
       setlocal cursorcolumn
     endif
     let s:cursorline_lock = 1
   endif
-endfunction"}}}
+endfunction
+"}}}

 " http://mattn.kaoriya.net/software/vim/20140523124903.htm
 let g:markdown_fenced_languages = [
@@ -905,10 +906,10 @@ if neobundle#tap('TweetVim')"{{{

   au MyAutoCmd FileType tweetvim call s:my_tweetvim_mappings()
   nnoremap [Space]ut :<C-u>Unite tweetvim<CR>
-  nnoremap [Space]us :<C-u>TweetVimUserStream<CR>
+  nnoremap [Space]tu :<C-u>TweetVimUserStream<CR>

   function! s:my_tweetvim_mappings()
-    setl nowrap
+    " setl nowrap
     nnoremap <buffer> [Space]s :<C-u>TweetVimSay<CR>
     nnoremap <buffer> <Leader>s :<C-u>TweetVimSearch<Space>
     nnoremap <buffer> [Space]tl :<C-u>Unite tweetvim<CR>
@@ -978,12 +979,23 @@ endif"}}}

 if neobundle#tap('vimshell.vim')"{{{
   call neobundle#config({
-        \ 'autoload': {
+        \ 'augroup': 'vimshell', 'autoload': {
+        \   'unite_sources': ['vimshell_external_history', 'vimshell_history', 'vimshell_zsh_complete'],
         \   'mappings': [['n', '<Plug>(vimshell_']],
-        \   'commands': ['VimShell', 'VimShellPop']
+        \   '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#helpers#vimshell_execute_complete', 'name': 'VimShellExecute'},
+        \                {'complete': 'customlist,vimshell#complete', 'name': 'VimShellBufferDir'}, 'VimShellSendString',
+        \                {'complete': 'customlist,vimshell#complete', 'name': 'VimShellTab'},
+        \                {'complete': 'customlist,vimshell#helpers#vimshell_execute_complete', 'name': 'VimShellTerminal'},
+        \                {'complete': 'customlist,vimshell#helpers#vimshell_execute_complete', 'name': 'VimShellInteractive'},
+        \                {'complete': 'buffer', 'name': 'VimShellSendBuffer'}]
         \ }
         \ })
-  function! neobundle#hooks.on_source(bundle)
+
+  function! neobundle#hooks.on_source(bundle)"{{{
     " PATH
     if has('unix')
       " home bin
@@ -992,40 +1004,36 @@ if neobundle#tap('vimshell.vim')"{{{
       let $PATH = '/usr/local/bin:' . $PATH
     endif

-    let g:vimshell_right_prompt = 'vcs#info("(%s)-[%b]", "(%s)-[%b|%a]")'
-    let g:vimshell_enable_smart_case = 1
-
-    let g:vimshell_execute_file_list['zip'] = 'zipinfo'
-    call vimshell#set_execute_file('tgz,gz', 'gzcat')
-    call vimshell#set_execute_file('tbz,bz2', 'bzcat')
-
-    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')
+    " let g:vimshell_right_prompt = 'vcs#info("(%s)-[%b]", "(%s)-[%b|%a]")'
+    " let g:vimshell_enable_smart_case = 1
+    "
+    " let g:vimshell_execute_file_list['zip'] = 'zipinfo'
+    " call vimshell#set_execute_file('tgz,gz', 'gzcat')
+    " call vimshell#set_execute_file('tbz,bz2', 'bzcat')
+    "
+    " 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')

     au 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
+          \ | 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

     au MyAutoCmd FileType int-* call s:interactive_settings()
     function! s:interactive_settings()
@@ -1035,9 +1043,11 @@ if neobundle#tap('vimshell.vim')"{{{
     let g:vimshell_max_command_history = 5000000
     " mapping
     "nnoremap [Space]s :<C-u>VimShell<CR>
-    au MyAutoCmd FileType vimshell inoremap <C-^> cd<Space>../<CR>
-    au MyAutoCmd FileType vimshell imap <C-l> <Plug>(vimshell_clear)
+    au MyAutoCmd FileType vimshell inoremap <buffer> <C-^> cd<Space>../<CR>
+    au MyAutoCmd FileType vimshell imap <buffer> <C-l> <Plug>(vimshell_clear)
   endfunction
+"}}}
+
   call neobundle#untap()
 endif"}}}

@@ -1169,7 +1179,7 @@ if neobundle#tap('unite.vim')"{{{
         \ -quick-match
   " Auto start if arguments is nothing
   if has('vim_starting') && expand("%") == ""
-    au MyAutoCmd VimEnter * nested :UniteStartup
+    " au MyAutoCmd VimEnter * nested :UniteStartup
   endif
   "}}}

@@ -2872,6 +2882,23 @@ if neobundle#tap('unite-quickfix')"{{{
 endif
 "}}}

+if neobundle#tap('J6uil.vim')"{{{
+  call neobundle#config({
+        \ 'autoload': {
+        \   'unite_sources': ['J6uil_members', 'J6uil_rooms'],
+        \   'mappings': [['n', '<Plug>(J6uil_']],
+        \   'commands': ['J6uilReconnect', 'J6uilNextRoom', 'J6uilPrevRoom', 'J6uilDisconnect',
+        \                {'complete': 'custom,J6uil#complete#room', 'name': 'J6uil'}]
+        \ }
+        \ })
+
+  let g:J6uil_user = 'yukimemi'
+  let g:J6uil_multi_window = 1
+
+  call neobundle#untap()
+endif
+"}}}
+
 " disable plugin
 let plugin_dicwin_disable = 1
 "===================================================================================}}}