Advertisement
Guest User

Untitled

a guest
May 8th, 2016
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. " Disable AutoComplPop.
  2. let g:acp_enableAtStartup = 0
  3. " Use neocomplete.
  4. let g:neocomplete#enable_at_startup = 1
  5. " Use smartcase.
  6. let g:neocomplete#enable_smart_case = 1
  7. " Set minimum syntax keyword length.
  8. let g:neocomplete#sources#syntax#min_keyword_length = 3
  9. let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
  10.  
  11. " Define dictionary.
  12. let g:neocomplete#sources#dictionary#dictionaries = {
  13. \ 'default' : '',
  14. \ 'vimshell' : $HOME.'/.vimshell_hist',
  15. \ 'scheme' : $HOME.'/.gosh_completions'
  16. \ }
  17.  
  18. " Define keyword.
  19. if !exists('g:neocomplete#keyword_patterns')
  20. let g:neocomplete#keyword_patterns = {}
  21. endif
  22. let g:neocomplete#keyword_patterns['default'] = '\h\w*'
  23.  
  24. " Plugin key-mappings.
  25. inoremap <expr><C-g> neocomplete#undo_completion()
  26. inoremap <expr><C-l> neocomplete#complete_common_string()
  27.  
  28. " Recommended key-mappings.
  29. " <CR>: close popup and save indent.
  30. inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
  31. function! s:my_cr_function()
  32. return (pumvisible() ? "\<C-y>" : "" ) . "\<CR>"
  33. " For no inserting <CR> key.
  34. "return pumvisible() ? "\<C-y>" : "\<CR>"
  35. endfunction
  36. " <TAB>: completion.
  37. inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
  38. " <C-h>, <BS>: close popup and delete backword char.
  39. inoremap <expr><C-h> neocomplete#smart_close_popup()."\<C-h>"
  40. inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>"
  41. " Close popup by <Space>.
  42. "inoremap <expr><Space> pumvisible() ? "\<C-y>" : "\<Space>"
  43.  
  44. " AutoComplPop like behavior.
  45. "let g:neocomplete#enable_auto_select = 1
  46.  
  47. " Shell like behavior(not recommended).
  48. "set completeopt+=longest
  49. "let g:neocomplete#enable_auto_select = 1
  50. "let g:neocomplete#disable_auto_complete = 1
  51. "inoremap <expr><TAB> pumvisible() ? "\<Down>" : "\<C-x>\<C-u>"
  52.  
  53. " Enable heavy omni completion.
  54. if !exists('g:neocomplete#sources#omni#input_patterns')
  55. let g:neocomplete#sources#omni#input_patterns = {}
  56. endif
  57. let g:neocomplete#sources#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)'
  58. let g:neocomplete#sources#omni#input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'
  59.  
  60. " Plugin key-mappings.
  61. imap <C-k> <Plug>(neosnippet_expand_or_jump)
  62. smap <C-k> <Plug>(neosnippet_expand_or_jump)
  63. xmap <C-k> <Plug>(neosnippet_expand_target)
  64.  
  65. " SuperTab like snippets behavior.
  66. "imap <expr><TAB>
  67. " \ pumvisible() ? "\<C-n>" :
  68. " \ neosnippet#expandable_or_jumpable() ?
  69. " \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
  70. smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
  71. \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
  72.  
  73. " For conceal markers.
  74. if has('conceal')
  75. set conceallevel=2 concealcursor=niv
  76. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement