首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在cygwin的vim中使用eclim

在cygwin的vim中使用eclim
EN

Stack Overflow用户
提问于 2014-09-24 03:55:14
回答 1查看 584关注 0票数 0

Eclim的粉丝们,我已经被降级到Windows,cygwin是我对一个真正的操作系统的唯一记忆。无可否认,Windows7比它的前几代要好,但我是一个相当铁杆的nix迷。不管怎样,我被卡住了。如果任何人有任何想法,我都很乐意倾听!

代码语言:javascript
复制
$ 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
EN

回答 1

Stack Overflow用户

发布于 2014-09-24 05:57:52

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

谢谢埃里克!

代码语言:javascript
复制
--- 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 " }}} 
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26003644

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档