7th-vim icon indicating copy to clipboard operation
7th-vim copied to clipboard

建议作者在ReadMe中,说明一下配置适配的环境要求

Open fgc346 opened this issue 1 year ago • 2 comments

我在参考这个vim的配置过程中,发现直接使用会有一定的问题。

个人电脑配置:

ubuntu18.04 vim 8.0 (不支持python) python版本 3.6 cmake3.10 (版本太低,有些插件需要高版本编译)

安装遇到的问题:

主要是安装插件一些插件遇到的问题

1 iamcco/markdown-preview.nvim

遇到的问题:这个markdown插件依赖python 解决办法:vim下载最新版源码,编译是配置支持python

2 YouCompleteMe

这个插件之前就听说很难装,安装过程很复杂 解决办法:

  • 遇到了cmake版本太低,
  • gcc版本太低,
  • vim源码搜索网上博客编译后,同时支持python2,python3,导致YCM插件安装失败。需要重新源码编译vim只支持python3。

3vim-airline 状态栏字体问题,

安装Powerline字体仍没有完全解决。

最后,非常感谢作者清晰的vim配置说明。我借鉴作者vimrc配置,结合自己日常使用的vim习惯,进行了改造,获益匪浅。

fgc346 avatar Dec 09 '23 22:12 fgc346

非常感谢您的建议,这个确实没怎么在 Linux 环境下测试过。我看看如何完善这个问题。

dofy avatar Dec 10 '23 06:12 dofy

安装YCM遇到的问题解决

插件安装之后,报编译错误,运行下面的命令

cd ~/.vim/budle/YouCompeleteMe
python3 install.py  --clang-completer

报错

 youcompletee(master$python3installpy--clang-completer 
eneratingycmdbuildconfiguration..-theccompileridentificationisgnu7.5.
-thecxxcompileridentificationisgnu7.5.0
checkforworkingccompiler:/usr/bin/cc
checkforworkingccompiler:/usr/bin/cc-works
detectingccompilerabiinfo
detectingccompilerabiinfo-done
detectingccompi1efeatures
detectingccompilefeaturesdone
checkforworkingcxxcompiler:/usr/bin/c++
checkforworkingcxxcompiler:/usr/bin/c++-works
detectingcxxcompilerabinfo
detectingcxxcompilerabiinfo-done
detectingcxxcompi1efeatures
detectingcxxcompilefeatures-done
makeerroratcmakelists.txt:232(message):
yourc++compilerdoesnotfu1lysupportc++17.
configuringincomplete,errorsoccurred!
eealso"/tmp/ycmbui1dz4jig905/cmakefiles/cmake0utput.1og
ailed
e:itisthighly*unlikelythatthisisabugbutratherthatthisisaproblemwiththe
heinstallationfailed:pleaseseeabovefortheactualerror,inordertogetmoreinforma
example,run:/usr/bin/python3/home/erma/.vim/bundle/youcompleteme/thirdparty/ycmd/bui
d.py--c1angcompleter--verbose

升级gcc,运行下面的命令

sudo apt-get install g++-8

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

再次运行编译命令,YCM编译成功。 这里提供我的一点解决问题的方案,仅供参考。

fgc346 avatar Dec 10 '23 23:12 fgc346