使用eclim和cygwin的vim

时间:2014-09-23 19:55:14

标签: eclim

Eclim粉丝,我已被降级到Windows,cygwin是我真正操作系统的唯一记忆。 Windows 7无疑比它的前辈更好,但我是一个相当顽固的* nix粉丝。无论如何,我被困住了。如果有人有任何想法,我很高兴听到他们!

$ uname -a
CYGWIN_NT-6.1 AAXA22A492 1.7.32(0.274/5/3) 2014-08-13 23:06 x86_64 Cygwin
$ vim --version | head -3
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 25 2014 19:00:15)
Included patches: 1-417
Compiled by <cygwin@cygwin.com>
$ cat .vimrc
" required for eclime (and general sanity):
set nocompatible
filetype plugin indent on

syntax on
set tabstop=3 shiftwidth=3 expandtab
set ic

$ tree -L 2 .vim
.vim
|-- eclim
|   |-- autoload
|   |-- bin
|   |-- compiler
|   |-- dict
|   |-- doc
|   |-- ftplugin
|   |-- indent
|   |-- plugin
|   `-- syntax
`-- plugin
    `-- eclim.vim

11 directories, 1 file
$ vim
Error detected while processing function <SNR>8_Init..eclim#LoadVimSettings..ecl
im#UserHome..eclim#cygwin#WindowsHome..<SNR>10_Cygpath..eclim#util#System..eclim
#util#EchoTrace:
line    7:
E121: Undefined variable: g:EclimHighlightTrace
E116: Invalid arguments for function <SNR>11_EchoLevel
Error detected while processing function <SNR>8_Init..eclim#LoadVimSettings..ecl
im#UserHome..eclim#cygwin#WindowsHome..<SNR>10_Cygpath:
line    6:
E171: Missing :endif
Error detected while processing function <SNR>8_Init..eclim#LoadVimSettings..ecl
im#UserHome..eclim#cygwin#WindowsHome:
line    2:
E171: Missing :endif
Error detected while processing function <SNR>8_Init..eclim#LoadVimSettings..ecl
im#UserHome:
line    3:
E171: Missing :endif
Press ENTER or type command to continue

1 个答案:

答案 0 :(得分:0)

Eric在this thread解决了这个问题 - 下面复制了解决方案。

谢谢Eric!

--- a/org.eclim.core/vim/eclim/autoload/eclim.vim 
+++ b/org.eclim.core/vim/eclim/autoload/eclim.vim 
@@ -352,6 +350,11 @@ function! eclim#ShutdownEclim() " {{{ 
 endfunction " }}} 

 function! eclim#LoadVimSettings() " {{{ 
+  if !exists('g:EclimLogLevel') 
+    let g:EclimLogLevel = 'info' 
+    let g:EclimHighlightTrace = 'Normal' 
+  endif 
+ 
   let settings_file = eclim#UserHome() . '/.eclim/.eclim_settings' 
   if filereadable(settings_file) 
     let lines = readfile(settings_file) 

--- a/org.eclim.core/vim/eclim/autoload/eclim/client/nailgun.vim 
+++ b/org.eclim.core/vim/eclim/autoload/eclim/client/nailgun.vim 
@@ -153,7 +153,7 @@ function! eclim#client#nailgun#GetEclimCommand(home) " {{{ 
   if has('win32unix') 
     " in cygwin, we must use 'cmd /c' to prevent issues with eclim script + 
     " some arg containing spaces causing a failure to invoke the script. 
-    return 'cmd /c "' . eclim#cygwin#WindowsPath(command) . '"' 
+    return [0, 'cmd /c "' . eclim#cygwin#WindowsPath(command) . '"'] 
   endif 
   return [0, '"' . command . '"'] 
 endfunction " }}}