Advertisement
Guest User

Untitled

a guest
Nov 26th, 2013
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.21 KB | None | 0 0
  1.  let neocomplete_mode = 1
  2. set encoding=utf-8
  3.  
  4. " start vundler
  5. filetype off
  6. set rtp+=~/.vim/bundle/vundle/
  7. call vundle#rc()
  8.  
  9. " core plugins
  10. Bundle "gmarik/vundle"
  11. Bundle "flazz/vim-colorschemes"
  12. Bundle "kien/ctrlp.vim"
  13.  
  14. Bundle "fsouza/go.vim"
  15. Bundle "dgryski/vim-godef"
  16. Bundle "nsf/gocode"
  17. Bundle "Blackrush/vim-gocode"
  18.  
  19.   Bundle "Shougo/neocomplete"
  20.   Bundle "Shougo/neosnippet"
  21.   Bundle "honza/vim-snippets"
  22.   Bundle "Shougo/echodoc.vim"
  23.  
  24. " enable all the plugins
  25. filetype plugin indent on
  26.  
  27. set ls=2
  28.  
  29.   " " NEOCOMPLETE (experimental)
  30.   " Disable AutoComplPop.
  31.   let g:acp_enableAtStartup = 0
  32.   let g:neocomplete#data_directory = "~/.vim/tmp/swap"
  33.   " Use neocomplete.
  34.   let g:neocomplete#enable_at_startup = 1
  35.   " Use smartcase.
  36.   let g:neocomplete#enable_smart_case = 1
  37.   " Set minimum syntax keyword length.
  38.   let g:neocomplete#sources#syntax#min_keyword_length = 2
  39.   let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
  40.  
  41.   " Define dictionary.
  42.   let g:neocomplete#sources#dictionary#dictionaries = {
  43.       \ 'default' : '',
  44.       \ 'vimshell' : $HOME.'/.vimshell_hist',
  45.       \ 'scheme' : $HOME.'/.gosh_completions'
  46.           \ }
  47.  
  48.   " Define keyword.
  49.   if !exists('g:neocomplete#keyword_patterns')
  50.       let g:neocomplete#keyword_patterns = {}
  51.   endif
  52.   let g:neocomplete#keyword_patterns['default'] = '\h\w*'
  53.  
  54.   " " snipmate rebind
  55.   " imap <C-l> <esc>a<Plug>snipMateNextOrTrigger
  56.   " smap <C-l> <Plug>snipMateNextOrTrigger
  57.  
  58.   " Plugin key-mappings.
  59.   inoremap <expr><C-g>  neocomplete#undo_completion()
  60.   inoremap <expr><C-l>  neocomplete#complete_common_string()
  61.   inoremap <expr><BS>   neocomplete#smart_close_popup()."\<C-h>"
  62.   inoremap <expr><C-y>  neocomplete#close_popup()
  63.   inoremap <expr><C-u>  neocomplete#close_popup() . "\<C-u>"
  64.   inoremap <expr><C-h>  neocomplete#smart_close_popup() . "\<C-w>"
  65.  
  66.   " Plugin key-mappings.
  67.   imap <C-i>     <Plug>(neosnippet_expand_or_jump)
  68.   smap <C-i>     <Plug>(neosnippet_expand_or_jump)
  69.   xmap <C-i>     <Plug>(neosnippet_expand_target)
  70.  
  71.   " <CR>: close popup and save indent.
  72.   inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
  73.   function! s:my_cr_function()
  74.     return pumvisible() ? neocomplete#close_popup() : "\<CR>"
  75.   endfunction
  76.  
  77.   " Enable heavy omni completion.
  78.   if !exists('g:neocomplete#sources#omni#input_patterns')
  79.     let g:neocomplete#sources#omni#input_patterns = {}
  80.   endif
  81.  
  82.   " golang fix
  83.   let g:neocomplete#sources#omni#input_patterns.go = '[^.[:digit:] *\t]\.\w*'
  84.  
  85.   " neosnippet
  86.   " For snippet_complete marker.
  87.   if has('conceal')
  88.     set conceallevel=2 concealcursor=i
  89.   endif
  90.  
  91.   " Enable snipMate compatibility feature.
  92.   let g:neosnippet#enable_snipmate_compatibility = 1
  93.  
  94.   " Tell Neosnippet about the other snippets
  95.   let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets'
  96.  
  97.   " vim-rails ovveride fix
  98.   let g:neocomplete#force_overwrite_completefunc = 1
  99.  
  100.   " ruby au's
  101.   augroup RubyCompletion
  102.     au!
  103.     autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
  104.     autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
  105.     autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
  106.     autocmd FileType eruby set filetype=html.eruby
  107.   augroup END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement