参考来源: https://stackoverflow.com/questions/47667119/ycm-error-the-ycmd-server-shut-down-restart-wit-the-instructions-in-the-docu //问题2
https://github.com/yangyangwithgnu/use_vim_as_ide/blob/master/README.md#8.4 //问题3
问题2:安装好vim后打开vim出现错误信息
错误信息:The ycmd server SHUT DOWN (restart with...the instructions in the documentation
解决步骤:使用:YcmDebugInfo comes back with "Server errored, no debug info from server".
cd ~/.vim/bundle/YouCompleteMe and ran python install.py // 提示ERROR: Unable to find executable 'cmake'. CMake is required to build ycmd
sudo apt install cmake
//以上命令让系统做了什么
/* Built target ycm_core
-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Detecting C compile features-- Detecting C compile features - done-- Found PythonLibs: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so (found version "3.6.6") -- Configuring done-- Generating done-- Build files have been written to: /tmp/regex_build_82orenjb
问题3:markdown实时显示出现问题
vim必须继承ruby解释器(源码安装编辑器vim),
sudo gem intall pygments.rb // 安装pygments.rb依赖库
提示 gem:command not found
sudo apt-get install ruby // 安装ruby,以便执行gem命令
sudo gem install redcarpet // 安装redcarpet依赖库
提示 ERROR: Error installing redcarpet:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/redcarpet-3.4.0/ext/redcarpet
/usr/bin/ruby2.5 -r ./siteconf20181111-16728-1ylk41o.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1sudo gem update --system // 解决安装redcarpet依赖库出现错误的问题gem install redcarpet --platform=ruby --verbosemkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.hERROR: Error installing redcarpet:ERROR: Failed to build gem native extension.Building has failed. See above output for more information on the failure.extconf failed, exit code sudo apt-get install ruby-dev