[from now] 2013/02/20 22:18:54

diff --git a/vimperator/.vimperatorrc b/vimperator/.vimperatorrc
index 5f64075..df3ca0b 100755
--- a/vimperator/.vimperatorrc
+++ b/vimperator/.vimperatorrc
@@ -330,7 +330,7 @@ liberator.globalVariables.plugin_loader_plugins = <>
    //auto_reload
    //auto_source
    //caret-hint
-   //commandBookmarklet
+   commandBookmarklet
    copy
    //direct_bookmark
    //escape-from-iframe
Merge branch 'master' of github.com:yuyunko/dotfiles
[from now] 2013/02/21 00:13:26

diff --git a/vim/.vimrc b/vim/.vimrc
index 5adc129..c833547 100755
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -59,7 +59,6 @@ NeoBundle 'tyru/open-browser.vim.git'
 NeoBundle 'glidenote/octoeditor.vim'
 NeoBundle 'MultipleSearch' " 1.0   Highlight multiple searches at the same time, each with a different color.
 NeoBundle 'zhisheng/visualmark.vim' " The mirror of visualmark.vim plugin, whose official website is http://www.vim.org/scripts/script.php?script_id=1026
-NeoBundle 'leafgarland/typescript-vim' " Typescript syntax files for Vim
 "NeoBundle 'dmitry-ilyashevich/vim-typescript' " Vim TypeScript syntax mirror for bundle
 NeoBundleLazy 'Shougo/neocomplcache-clang'
 NeoBundleLazy 'Shougo/neocomplcache-clang_complete'
@@ -115,6 +114,9 @@ NeoBundleLazy 'yuroyoro/yuroyoro256.vim'
 NeoBundle 'https://bitbucket.org/pentie/vimrepress'
 NeoBundle 'goldfeld/vim-seek' " Seek makes navigating long lines effortless, acting like f but taking two characters.
 "NeoBundle 'MarcWeber/vim-haxe' " vim runtime directory providing support for the haxe compiler - be more productive
+NeoBundleLazy 'leafgarland/typescript-vim', {
+            \ 'autoload': { 'filetypes': 'typescript' }
+            \ }
 NeoBundleLazy 'kchmck/vim-coffee-script', {
             \ 'autoload': { 'filetypes': 'coffee' }
             \ }
@@ -287,6 +289,9 @@ set wildmenu
 if has('mouse')
     set mouse=a
 endif
+"自動で読み込み直す
+set autoread
+"set updatetime=50
 " バッファを閉じる時にバッファリストから削除
 "autocmd BufReadPre * setlocal bufhidden=delete
 "pluginを使用可能にする
@@ -758,7 +763,7 @@ augroup MyFileType
     if has('unix')
         "autocmd BufWritePost *.ts call vimproc#system_bg($HOME . '/bin/scripts/wrapper.sh ' . $HOME . '/bin/scripts/convertTs2Cmd.sh ' . expand("%"))
     else
-        autocmd BufWritePost *.ts call vimproc#system_bg('c:/work/winscripts/bat/wrapper.bat c:/work/winscripts/wsh/TypeScript/convertTs2Cmd.cmd ' . shellescape(expand("%:p")))
+        "autocmd BufWritePost *.ts call vimproc#system_bg('c:/work/winscripts/bat/wrapper.bat c:/work/winscripts/wsh/TypeScript/convertTs2Cmd.cmd ' . shellescape(expand("%:p")))
     endif
     autocmd BufNewFile,BufRead *.cmd setl ft=javascript fenc=cp932 ff=dos
     autocmd BufNewFile,BufRead *.hta setl ft=html fenc=utf-8 ff=unix
@@ -1231,15 +1236,14 @@ call quickrun#module#register(s:hook, 1)
 unlet s:hook
 " }}}

-" TypeScript コンパイル後にヘッダ等を追加 {{{
+" TypeScript reference pathを読み込んでコンパイル {{{
 let s:hook = {
-            \ "name" : "js2cmd",
+            \ "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)
@@ -1253,13 +1257,24 @@ function! s:hook.on_module_loaded(session, context)
     "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
+"}}}

+" コンパイル後にヘッダ等を追加 {{{
+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\r")
     for line in readfile(a:session.config.srcfile, '', 10)
-        if line =~ '^//'
-            if line[3 : 4] =~ 'OP'
+        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\r")
@@ -1318,6 +1333,7 @@ let g:quickrun_config = {
             \       "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,
             \   },
@@ -1325,7 +1341,8 @@ let g:quickrun_config = {
             \       "command": "coffee",
             \       "cmdopt": "-cb",
             \       "exec": "%c %o %s",
-            \       "hook/output_command/log": 1
+            \       "hook/output_command/log": 1,
+            \       "hook/js2cmd/enable": 1
             \   }
             \ }
 "}}}
@@ -1344,6 +1361,15 @@ let g:quickrun_config = {
 autocmd FileType python setl autoindent
 autocmd FileType python setl smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
 autocmd FileType python setl tabstop=8 expandtab shiftwidth=4 softtabstop=4
+" coffeescript
+augroup coffeescript-auto-compile
+    autocmd!
+    " 適当なタイミングで再読み込み
+    autocmd CursorHold *.cmd checktime
+    autocmd CursorHold *.js checktime
+    autocmd CursorMoved *.cmd checktime
+    autocmd CursorMoved *.js checktime
+augroup END
 "===================================================================================}}}

 "{{{ ========== Temp Settings =========================================================