wsdjeg / .SpaceVim.d

My dotfiles for Archlinux and Windows
1.44k stars 133 forks source link

你好,我想请问下在Ubuntu下面如何安装这个配置文件? #49

Closed demonhumen closed 8 years ago

demonhumen commented 8 years ago

我使用的是Neovim,用了你提供的方法,install.sh没有安装只是提示installed。

谢谢

wsdjeg commented 8 years ago

你想要安装哪一个? vim 还是 neovim的配置?

wsdjeg commented 8 years ago

修复了vim安装脚本,请更新

demonhumen commented 8 years ago

vim下比较好用,neovim总是有各种错误,谢谢了

wsdjeg commented 8 years ago

恩, 我的配置兼容vim的,但是在linux系统下,建议使用neovim, 而且我的配置跟多的是偏向于neovim.

demonhumen commented 8 years ago

好的,谢谢你的回答,我使用的是ubuntu,我用neovim安装后会出现很多问题,比如按退格键就提示错误等等。但是vim下就很正常运行。

wsdjeg commented 8 years ago

不客气, neovim,需要一些而外的配置. 需要安装一个neovim-python 客户端.

Q:how to install neovim in ubuntu? A:

sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install neovim
sudo apt-get install python python3 python-dev python3-dev python-pip python3-pip
pip2 install --user neovim
pip3 install --user neovim

更新neovim, 除了用api-get更新neovim,还需要更新对应的python客户端包

pip2 install --upgrade --user neovim
pip3 install --upgrade --user neovim
demonhumen commented 8 years ago

好的,尝试一下配置,非常感谢你的回复,谢谢,祝好运

wsdjeg commented 8 years ago

不客气

demonhumen commented 8 years ago

我重新按照您提供这个方法来安装的配置,在打开检测.java文件时,还是出现错误:

:e /home/b/tesError detected while processing FileType Auto commands for "java":

E492: Not an editor command: RainbowParentheses

wsdjeg commented 8 years ago

不要打开任何文件,在终端运行nvim,打开后执行call dein#install()

demonhumen commented 8 years ago

安装后直接运行NVIM错误:

[dein] Error occurred while executing hook: unite.vim [dein] Vim(call):E117: Unknown function: unite#custom#source Press ENTER or type command to continue

以及NVIM运行错误:

Error detected while processing function deoplete#mappings#smart_close_popup[1]. .deoplete#smart_close_popup:
line 1:
E121: Undefined variable: g:deoplete#_context

十分抱歉了,搜索了一下也找不到相关解决办法。如果不能解决就不继续折腾了,谢谢您了。

wsdjeg commented 8 years ago

没关系, 你执行了:call dein#install() 了吗? 这个错误是因为 配置中使用了这些方法,但提供这方法的插件没有安装好.

你打开nvim,不管有没有错误, 多按几次 <esc> 取消掉错误消息, 然后执行:call dein#install(), 然后你可以去看看电影, 安装需要很长时间的.

demonhumen commented 8 years ago

反复使用这个命令终于正常了,安装以后出现这个错误:

No Javavi library classes found, it means that we couldn't compile it. Do you ha ve JDK8+ installed?

我分别安装了openjdk 9 和 Oracle JDK 还是出现这个个错误,您的配置文件里面是不是还需另外设置JAVA目录呢?

wsdjeg commented 8 years ago

你确定你可以在终端执行 javac 和 java 命令? 如果有, 那么 vim 下 运行 :JCserverCompile 命令

demonhumen commented 8 years ago

我确定可以运行javac 和 java 以及 java -version 等命令

在VIM下?还是在NVIM下?

至于:JCserverCompile命令, 我在NVIM和VIM都试过没有出现这个命令,不知道是不是在安装时出现问题?

再次执行:call dein#install()

[dein] You may have used the wrong plugin name, or all of the plugins are alread y installed.

java -version 运行出现

root@ubuntu:/home/b# java -version java version "1.8.0_92" Java(TM) SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

wsdjeg commented 8 years ago

请不要使用root用户, 用普通账户 安装这个脚本, 另外, 默认是安装到~/ 下面

demonhumen commented 8 years ago

你好,我并没有使用root用户安装您的脚本,刚才是安装其他文件使用的root账户

wsdjeg commented 8 years ago

那好,在vim中执行这个,将输出内容给我看看: :verbose command JCserverCompile

wsdjeg commented 8 years ago

不好意思, 这个插件是延迟加载的.

你在终端,用vim打开一个java文件, vim Foo.java, 然后执行:JCserverCompile

demonhumen commented 8 years ago

我是使用的普通用户来执行,这个root用户是刚才安装其他软件随手抓下来的。

仍然会出现:

[dein] Error occurred while executing hook: unite.vim [dein] Vim(call):E117: Unknown function: unite#custom#source Press ENTER or type command to continue

再次执行:call dein#install()

[dein] You may have used the wrong plugin name, or all of the plugins are alread y installed.

真是让您费心了,我重新安装过了ubuntu 16.04,依旧是这个错误,十分感谢您的回复。

wsdjeg commented 8 years ago

[dein] Error occurred while executing hook: unite.vim [dein] Vim(call):E117: Unknown function: unite#custom#source Press ENTER or type command to continue

这个是由于unite没有安装正确

终端 执行ls ~/.cache/vimfiles/repos/github.com/Shougo/

比较一下,是不是有以下目录

context_filetype.vim  deoplete.nvim  neobundle-vim-recipes  neoinclude.vim  neosnippet-snippets  unite-help     unite.vim     vimshell.vim
dein.vim              neco-syntax    neocomplcache.vim      neomru.vim      neosnippet.vim       unite-outline  vimfiler.vim
denite.nvim           neco-vim       neocomplete            neopairs.vim    neoyank.vim          unite-session  vimproc.vim
demonhumen commented 8 years ago
context_filetype.vim  neobundle-vim-recipes  neosnippet-snippets  unite-session
dein.vim              neocomplete            neosnippet.vim       unite.vim
deoplete.nvim         neoinclude.vim         neoyank.vim          vimfiler.vim
neco-syntax           neomru.vim             unite-help           vimproc.vim
neco-vim              neopairs.vim           unite-outline        vimshell.vim

经对比neocomplcache.vim,denite.nvim没有安装上,我手动补上后,于是重新安装unite,vim,还是会出现:

[dein] Error occurred while executing hook: unite.vim [dein] Vim(call):E117: Unknown function: unite#custom#source Press ENTER or type command to continue

补全后:

context_filetype.vim  neobundle-vim-recipes  neosnippet-snippets  unite.vim
dein.vim              neocomplcache.vim      neosnippet.vim       vimfiler.vim
denite.nvim           neocomplete            neoyank.vim          vimproc.vim
deoplete.nvim         neoinclude.vim         unite-help           vimshell.vim
neco-syntax           neomru.vim             unite-outline
neco-vim              neopairs.vim           unite-session

是否需要另外配置.vimrc和init.vim?

demonhumen commented 8 years ago

这是运行:JCserverCompile出现的错误:

Error detected while processing function javacomplete#server#CompilationJobHandl
er:                                                                             
line    9:                                                                      
Note: Some input files use unchecked or unsafe operations.  
wsdjeg commented 8 years ago

@demonhumen

推荐使用neovim, ubuntu自带的vim版本比较老. neovim的执行命令是nvim. 因此 你需要终端 执行nvim Foo.java, 然后在执行这个:JCserverCompile

demonhumen commented 8 years ago

这就是在NVIM里面运行:JCserverCompile的提示:

foo.java 1,0-1 All Error detected while processing function javacomplete#server#CompilationJobHandl er:
line 9:
Note: Some input files use unchecked or unsafe operations.

另外在终端中每次运行NVIM都会出现:

[dein] Error occurred while executing hook: unite.vim [dein] Vim(call):E117: Unknown function: unite#custom#source Press ENTER or type command to continue

另外我更新过VIM,这是我的版本号:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 16 2016 10:50:38) Included patches: 1-1689

给你带来困扰,很是抱歉啊,如果不好解决的话,就关掉吧,十分感谢你的耐性指导和回复。

wsdjeg commented 8 years ago

@demonhumen 我怀疑是插件管理器dein的依赖你没有安装,

Requirements

    Vim 7.4 or above or NeoVim.
    "rsync" command in $PATH (UNIX)
    "xcopy" command in $PATH (Windows)
    "git" command in $PATH (if you want to install github or vim.org plugins)

linux 系统下 你需要有rsync这个命令, 终端下执行 type rsync 的结果是什么?

demonhumen commented 8 years ago

运行type rsync 结果是:

rsync is hashed (/usr/bin/rsync)

rsync应该是存在的

rsync  version 3.1.1  protocol version 31
Copyright (C) 1996-2014 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/

我觉得可能是dein插件配置,或者没有安装上吧,unite.vim这个插件的命令就不能输入,nvim打开时也会报错。

wsdjeg commented 8 years ago

ok, 那么执行如下命令, 终端

rm -rf ~/.cache/vimfiles/repos/github.com/Shougo/unite.vim/
cd ~/.cache/vimfiles/repos/github.com/Shougo/
git clone https://github.com/Shougo/unite.vim.git

然后打开nvim, 执行 call dein#update(), 切忌 等到 所有执行万, 打印红色update done 再关闭nvim.

demonhumen commented 8 years ago

就是这个问题,解决了,没有错误了,谢谢

另外想请问下你这个配置可以在windows下使用吗?

wsdjeg commented 8 years ago

支持不是很好,windows这个系统不适合玩命令行工具. 尤其在vim调用shell程序时候,他会打开一个cmd.exe 的黑框. 如果是搞开发,不建议用window系统,bug巨多.

demonhumen commented 8 years ago

确实是这样,现在nvim对Windows支持也不好,谢谢了

wsdjeg commented 8 years ago

不客气. neovim 有几个PR是关于window build 的, 你可以搜索看看, 里面提及到如何在window下面安装的.

francioshu commented 7 years ago

我也存在这个问题,还未解决

E117: Unknown function: dein#add [dein] Error occurred while executing hook: unite.vim [dein] Vim(let):E118: Too many arguments for function: globpath Press ENTER or type command to continue

wsdjeg commented 7 years ago

你的vim版本太低, globpath() 这个函数不接受第四个参数,建议安装vim8