Commits

kotakanbe  committed 5cf76bb Draft

javascript

  • Participants
  • Parent commits 5955874

Comments (0)

Files changed (1)

 
 " filer
 NeoBundle 'https://github.com/Shougo/vimfiler.git'
+NeoBundle 'https://github.com/kien/ctrlp.vim.git'
 
 " binary editor
 NeoBundle 'https://github.com/Shougo/vinarise.git'
 NeoBundle 'https://github.com/cakebaker/scss-syntax.vim.git'
 NeoBundle 'https://github.com/thinca/vim-ref.git'
 NeoBundle 'https://github.com/msanders/snipmate.vim.git'
+NeoBundle 'https://github.com/teramako/jscomplete-vim.git'
 
 " text
 NeoBundle 'https://github.com/vim-scripts/VimOutliner.git'
     endfunction
     setl foldtext=FoldText()
 endfunction
+
+autocmd FileType javascript
+  \ :setl omnifunc=jscomplete#CompleteJS
+let g:jscomplete_use = ['dom', 'moz']
+
 "}}}
 
 " => Vim grep {{{
 nnoremap [unite]u  :<C-u>Unite<Space>
 nnoremap <silent> ;  :<C-u>Unite history/command command<CR>
 nnoremap <silent> [unite]a  :<C-u>UniteWithCurrentDir -buffer-name=files buffer file_mru bookmark file<CR>
-nnoremap <silent> [unite]l  :<C-u>Unite -buffer-name=files file_rec<CR>
+nnoremap <silent> [unite]l  :<C-u>Unite -buffer-name=files file<CR>
 nnoremap <silent> [unite]f  :<C-u>Unite -buffer-name=files file_rec<CR>
 nnoremap <silent> [unite]rm  :<C-u>Unite ref/man<CR>
 nnoremap <silent> [unite]re  :<C-u>Unite ref/erlang<CR>
 " neocomplcacheにも補完機能はあるらしいが、とりあえずsnipmate を使うことにする。
 " VTB P342
 "------------------------------------
-let g:snippets_dir='~/.vim/snippets'
+" let g:snippets_dir='~/.vim/snippets'
+let g:snippets_dir='~/.bundle/snipmate.vim/snippets'
 
 imap <Tab> <Plug>(neocomplcache_snippets_expand)
 smap <Tab> <Plug>(neocomplcache_snippets_expand)
   autocmd BufWritePost * if &binary | set nomod | endif
 augroup END
 
-
+"vimfiler {{{
+"vimデフォルトのエクスプローラをvimfilerで置き換える
+let g:vimfiler_as_default_explorer = 1
+"セーフモードを無効にした状態で起動する
+let g:vimfiler_safe_mode_by_default = 0
+"現在開いているバッファのディレクトリを開く
+nnoremap <silent> <Leader>fe :<C-u>VimFilerBufferDir -quit<CR>
+"現在開いているバッファをIDE風に開く
+nnoremap <silent> <Leader>fi :<C-u>VimFilerBufferDir -split -simple -winwidth=35 -no-quit<CR>
+ 
+"デフォルトのキーマッピングを変更
+augroup vimrc
+  autocmd FileType vimfiler call s:vimfiler_my_settings()
+augroup END
+function! s:vimfiler_my_settings()
+  nmap <buffer> q <Plug>(vimfiler_exit)
+  nmap <buffer> Q <Plug>(vimfiler_hide)
+endfunction
+ 
+"}}}