2015-07-11 94 views
4

我一直在試圖設置omnisharp來與Vim一起使用csharp項目。這裏是我的設置Omnisharp,VIM和csharp未找到模式

這裏是我的設置

lsb_release -a 
Distributor ID: Ubuntu 
Description: Ubuntu 14.04.2 LTS 
Release:  14.04 
Codename:  trusty 
我實際使用crouton

,在Chromebook。我使用sudo enter-chroot並以此方式使用Vim。

我的VIM信息

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32) 
Included patches: 1-52 
Modified by [email protected] 
Compiled by [email protected] 
Huge version without GUI. Features included (+) or not (-): 
+acl    +farsi   +mouse_netterm +syntax 
+arabic   +file_in_path +mouse_sgr  +tag_binary 
+autocmd   +find_in_path -mouse_sysmouse +tag_old_static 
-balloon_eval +float   +mouse_urxvt  -tag_any_white 
-browse   +folding   +mouse_xterm  -tcl 
++builtin_terms -footer   +multi_byte  +terminfo 
+byte_offset  +fork()   +multi_lang  +termresponse 
+cindent   +gettext   -mzscheme  +textobjects 
-clientserver -hangul_input +netbeans_intg +title 
-clipboard  +iconv   +path_extra  -toolbar 
+cmdline_compl +insert_expand -perl   +user_commands 
+cmdline_hist +jumplist  +persistent_undo +vertsplit 
+cmdline_info +keymap   +postscript  +virtualedit 
+comments  +langmap   +printer   +visual 
+conceal   +libcall   +profile   +visualextra 
+cryptv   +linebreak  +python   +viminfo 
+cscope   +lispindent  -python3   +vreplace 
+cursorbind  +listcmds  +quickfix  +wildignore 
+cursorshape  +localmap  +reltime   +wildmenu 
+dialog_con  -lua    +rightleft  +windows 
+diff   +menu   -ruby   +writebackup 
+digraphs  +mksession  +scrollbind  -X11 
-dnd    +modify_fname +signs   -xfontset 
-ebcdic   +mouse   +smartindent  -xim 
+emacs_tags  -mouseshape  -sniff   -xsmp 
+eval   +mouse_dec  +startuptime  -xterm_clipboard 
+ex_extra  +mouse_gpm  +statusline  -xterm_save 
+extra_search -mouse_jsbterm -sun_workshop -xpm 
    system vimrc file: "$VIM/vimrc" 
    user vimrc file: "$HOME/.vimrc" 
2nd user vimrc file: "~/.vim/vimrc" 
     user exrc file: "$HOME/.exrc" 
    fall-back for $VIM: "/usr/share/vim" 
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1  
Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim  -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions 

我的.vimrc文件進行測試

execute pathogen#infect() 
syntax on 
filetype plugin indent on 

set statusline+=%#warningmsg# 
set statusline+=%{SyntasticStatuslineFlag()} 
set statusline+=%* 

let g:syntastic_always_populate_loc_list = 1 
let g:syntastic_auto_loc_list = 1 
let g:syntastic_check_on_open = 1 
let g:syntastic_check_on_wq = 0 

我的插件。我使用的病原體

YouCompleteMe omnisharp-vim syntastic vim-dispatch 

我的單聲道版本

Mono JIT compiler version 4.0.2 (Stable 4.0.2.5/c99aa0c Wed Jun 24 10:04:37 UTC 2015) 
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com 
     TLS:   __thread 
     SIGSEGV:  altstack 
     Notifications: epoll 
     Architecture: amd64 
     Disabled:  none 
     Misc:   softdebug 
     LLVM:   supported, not enabled. 
     GC:   sgen 

當我從一個項目打開CS文件,我得到了以下信息,因此服務器正在啓動

!mono '/home/bilal/.vim/bundle/omnisharp-vim/server/OmniSharp/bin/Debug/OmniSharp.exe' -p 2000 -s '/home/bilal/Documents/deletethis/test1/test1.sln' 
(headless/24015) 

但我每次都會收到以下消息,而不是任何智能感知

Omni completion (^O^N^P) Pattern not found 

我試過使用C-x,C-o,但我總是收到相同的消息。

有什麼我可以做的調試這一些更多?真的不知道我在做什麼錯在這裏

感謝

+0

同樣的事情發生在我身上。從那以後你有沒有找到解決方案? –

+0

我沒有遺憾。我放棄了這一段時間。 –

回答

1

這是發生在我身上,我已經錯過了從服務器文件夾中運行xbuild的步驟。

重新運行下面的最後兩行爲我固定它。

cd ~/.vim/bundle 
git clone https://github.com/OmniSharp/omnisharp-vim.git 
cd omnisharp-vim 
git submodule update --init --recursive 
cd server 
xbuild 
+0

對不起。我終於有機會再次嘗試這種方式,但它仍然無法工作。我不知道這是否是vim或crouton的問題。嘆.. –