title: Omnisharp vim with neocomplete not working
body: <p>I installed Omnisharp and I am able to get autocompletion with &lt; Ctrl+X > + &lt; Ctrl+O >, but this is obviously not ideal as you have to keep hitting this weird combination of keys. I have also installed neocomplete bundle to try and get autocompletion while I type but I am not getting the same autocompletions that come with Omnisharp.</p>
  
  <p>I tried to used these neocomplete settings supplied from the Omnisharp github page in my vimrc, which gives me an error when used on its own:
  <a href="https://github.com/OmniSharp/omnisharp-vim/wiki/Example-NeoComplete-Settings" rel="nofollow">https://github.com/OmniSharp/omnisharp-vim/wiki/Example-NeoComplete-Settings</a></p>
  
  <p>And paired with the example settings on the main page here: <a href="https://github.com/OmniSharp/omnisharp-vim" rel="nofollow">https://github.com/OmniSharp/omnisharp-vim</a></p>
  
  <p>Seems to run without errors, but again is not giving me the autocompletions that are consistent with what I get from hitting &lt; Ctrl+X > + &lt; Ctrl+O ></p>
  
  <p>This is what my .vimrc currently looks like:</p>
  
  <pre><code>execute pathogen#infect()
  
  " OmniSharp won't work without this setting
  filetype plugin on
  
  "This is the default value, setting it isn't actually necessary
  let g:OmniSharp_host = "http://localhost:2000"
  
  "Set the type lookup function to use the preview window instead of the status line
  "let g:OmniSharp_typeLookupInPreview = 1
  
  "Timeout in seconds to wait for a response from the server
  let g:OmniSharp_timeout = 1
  
  "Showmatch significantly slows down omnicomplete
  "when the first match contains parentheses.
  set noshowmatch
  
  "Super tab settings - uncomment the next 4 lines
  "let g:SuperTabDefaultCompletionType = 'context'
  "let g:SuperTabContextDefaultCompletionType = "&lt;c-x&gt;&lt;c-o&gt;"
  "let g:SuperTabDefaultCompletionTypeDiscovery = ["&amp;omnifunc:&lt;c-x&gt;&lt;c-o&gt;","&amp;completefunc:&lt;c-x&gt;&lt;c-n&gt;"]
  "let g:SuperTabClosePreviewOnPopupClose = 1
  
  "don't autoselect first item in omnicomplete, show if only one item (for preview)
  "remove preview if you don't want to see any documentation whatsoever.
  set completeopt=longest,menuone,preview
  " Fetch full documentation during omnicomplete requests. 
  " There is a performance penalty with this (especially on Mono)
  " By default, only Type/Method signatures are fetched. Full documentation can still be fetched when
  " you need it with the :OmniSharpDocumentation command.
  " let g:omnicomplete_fetch_documentation=1
  
  "Move the preview window (code documentation) to the bottom of the screen, so it doesn't move the code!
  "You might also want to look at the echodoc plugin
  set splitbelow
  
  " Get Code Issues and syntax errors
  let g:syntastic_cs_checkers = ['syntax', 'semantic', 'issues']
  
  augroup omnisharp_commands
      autocmd!
  
      "Set autocomplete function to OmniSharp (if not using YouCompleteMe completion plugin)
      autocmd FileType cs setlocal omnifunc=OmniSharp#Complete
  
      " Synchronous build (blocks Vim)
      "autocmd FileType cs nnoremap &lt;F5&gt; :wa!&lt;cr&gt;:OmniSharpBuild&lt;cr&gt;
      " Builds can also run asynchronously with vim-dispatch installed
      autocmd FileType cs nnoremap &lt;leader&gt;b :wa!&lt;cr&gt;:OmniSharpBuildAsync&lt;cr&gt;
      " automatic syntax check on events (TextChanged requires Vim 7.4)
      autocmd BufEnter,TextChanged,InsertLeave *.cs SyntasticCheck
  
      " Automatically add new cs files to the nearest project on save
      autocmd BufWritePost *.cs call OmniSharp#AddToProject()
  
      "show type information automatically when the cursor stops moving
      autocmd CursorHold *.cs call OmniSharp#TypeLookupWithoutDocumentation()
  
      "The following commands are contextual, based on the current cursor position.
  
      autocmd FileType cs nnoremap gd :OmniSharpGotoDefinition&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;leader&gt;fi :OmniSharpFindImplementations&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;leader&gt;ft :OmniSharpFindType&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;leader&gt;fs :OmniSharpFindSymbol&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;leader&gt;fu :OmniSharpFindUsages&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;leader&gt;fm :OmniSharpFindMembers&lt;cr&gt; "finds members in the current buffer
      " cursor can be anywhere on the line containing an issue 
      autocmd FileType cs nnoremap &lt;leader&gt;x  :OmniSharpFixIssue&lt;cr&gt;  
      autocmd FileType cs nnoremap &lt;leader&gt;fx :OmniSharpFixUsings&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;leader&gt;tt :OmniSharpTypeLookup&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;leader&gt;dc :OmniSharpDocumentation&lt;cr&gt;
      autocmd FileType cs nnoremap &lt;C-K&gt; :OmniSharpNavigateUp&lt;cr&gt; "navigate up by method/property/field
      autocmd FileType cs nnoremap &lt;C-J&gt; :OmniSharpNavigateDown&lt;cr&gt; "navigate down by method/property/field
  
  augroup END
  
  
  " this setting controls how long to wait (in ms) before fetching type / symbol information.
  set updatetime=500
  " Remove 'Press Enter to continue' message when type information is longer than one line.
  set cmdheight=2
  
  " Contextual code actions (requires CtrlP)
  nnoremap &lt;leader&gt;&lt;space&gt; :OmniSharpGetCodeActions&lt;cr&gt;
  " Run code actions with text selected in visual mode to extract method
  vnoremap &lt;leader&gt;&lt;space&gt; :call OmniSharp#GetCodeActions('visual')&lt;cr&gt;
  
  " rename with dialog
  nnoremap &lt;leader&gt;nm :OmniSharpRename&lt;cr&gt;
  nnoremap &lt;F2&gt; :OmniSharpRename&lt;cr&gt;      
  " rename without dialog - with cursor on the symbol to rename... ':Rename newname'
  command! -nargs=1 Rename :call OmniSharp#RenameTo("&lt;args&gt;")
  
  " Force OmniSharp to reload the solution. Useful when switching branches etc.
  nnoremap &lt;leader&gt;rl :OmniSharpReloadSolution&lt;cr&gt;
  nnoremap &lt;leader&gt;cf :OmniSharpCodeFormat&lt;cr&gt;
  " Load the current .cs file to the nearest project
  nnoremap &lt;leader&gt;tp :OmniSharpAddToProject&lt;cr&gt;
  
  " (Experimental - uses vim-dispatch or vimproc plugin) - Start the omnisharp server for the current solution
  nnoremap &lt;leader&gt;ss :OmniSharpStartServer&lt;cr&gt;
  nnoremap &lt;leader&gt;sp :OmniSharpStopServer&lt;cr&gt;
  
  " Add syntax highlighting for types and interfaces
  nnoremap &lt;leader&gt;th :OmniSharpHighlightTypes&lt;cr&gt;
  "Don't ask to save when changing buffers (i.e. when jumping to a type definition)
  set hidden
  
  autocmd FileType cs setlocal omnifunc=OmniSharp#Complete
  "Note: This option must set it in .vimrc(_vimrc).  NOT IN .gvimrc(_gvimrc)!
  " Disable AutoComplPop.
  let g:acp_enableAtStartup = 0
  " Use neocomplete.
  let g:neocomplete#enable_at_startup = 1
  " Don't Use smartcase.
  let g:neocomplete#enable_smart_case = 0
  let g:neocomplete#enable_auto_close_preview = 0
  " Define dictionary.
  let g:neocomplete#sources#dictionary#dictionaries = {
      \ 'default' : '',
      \ 'vimshell' : $HOME.'/.vimshell_hist'
          \ }
  
  " Plugin key-mappings.
  inoremap &lt;expr&gt;&lt;C-g&gt;     neocomplete#undo_completion()
  inoremap &lt;expr&gt;&lt;C-l&gt;     neocomplete#complete_common_string()
  
  " Recommended key-mappings.
  " &lt;CR&gt;: close popup and save indent.
  inoremap &lt;silent&gt; &lt;CR&gt; &lt;C-r&gt;=&lt;SID&gt;my_cr_function()&lt;CR&gt;
  function! s:my_cr_function()
    "return neocomplete#close_popup() . "\&lt;CR&gt;"
    " For no inserting &lt;CR&gt; key.
    return pumvisible() ? neocomplete#close_popup() : "\&lt;CR&gt;"
  endfunction
  " &lt;TAB&gt;: completion.
  inoremap &lt;expr&gt;&lt;TAB&gt;  pumvisible() ? "\&lt;C-n&gt;" : "\&lt;TAB&gt;"
  inoremap &lt;expr&gt;&lt;S-TAB&gt;  pumvisible() ? "\&lt;C-p&gt;" : "\&lt;TAB&gt;"
  " &lt;C-h&gt;, &lt;BS&gt;: close popup and delete backword char.
  inoremap &lt;expr&gt;&lt;C-h&gt; neocomplete#smart_close_popup()."\&lt;C-h&gt;"
  inoremap &lt;expr&gt;&lt;BS&gt; neocomplete#smart_close_popup()."\&lt;C-h&gt;"
  inoremap &lt;expr&gt;&lt;C-y&gt;  neocomplete#close_popup()
  inoremap &lt;expr&gt;&lt;C-e&gt;  neocomplete#cancel_popup()
  
  let g:neocomplete#enable_auto_select = 0
  let g:neocomplete#disable_auto_complete = 0
  
  " Enable heavy omni completion.
  
  call neocomplete#custom#source('_', 'sorters', [])
  
  if !exists('g:neocomplete#sources')
          let g:neocomplete#sources = {}
  endif
  
  if !exists('g:neocomplete#sources#omni#input_patterns')
    let g:neocomplete#sources#omni#input_patterns = {}
  endif
  
  let g:neocomplete#sources#omni#input_patterns.cs = '.*[^=\);]'
  let g:neocomplete#sources.cs = ['omni']
  let g:neocomplete#enable_refresh_always = 0
  let g:echodoc_enable_at_startup = 1
  let g:neocomplete#enable_insert_char_pre = 1
  </code></pre>