sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
GCC 8 on Ubuntu 16.04:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-8 g++-8
gcc-8 --version
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
sudo vi /etc/ld.so.conf.d/python3.conf
/usr/local/lib/
sudo ldconfig
~/.pip/pip.conf
[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
cd vim82/
./configure --with-features=huge
--enable-multibyte
--enable-rubyinterp
--enable-pythoninterp=yes
--with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu
--enable-python3interp=yes
--with-python3-command=python3.6
--enable-perlinterp
--enable-luainterp
--enable-gui=gtk2
--enable-cscope
--prefix=/usr
或者
./configure --with-features=huge
--enable-multibyte
--enable-rubyinterp
--enable-pythoninterp=no
--with-python3-config-dir=/usr/local/lib/python3.6/config-3.6m-i386-linux-gnu
--enable-python3interp=yes
--with-python3-command=python3.6
--enable-perlinterp
--enable-luainterp
--enable-gui=gtk2
--enable-cscope
--prefix=/usr \
https://github.com/ycm-core/llvm/releases
The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code 1. Type ':YcmToggleLogs ycmd_44937_stderr_tziapstd.log' to check the logs.
archlinux更新系统以后,YCM无法使用.通过排查发现,是python3的module collections的类引用改变了.解决方法如下 :
调整YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py,
将from collections import MutableMapping as DictMixin 改为
from collections.abc import MutableMapping as DictMixin
调整YouCompleteMe/third_party/ycmd/third_party/frozendict/frozendict/init.py
将class frozendict(collections.Mapping):调整为
class frozendict(collections.abc.Mapping):
从新编译ycm即可 python3 install.py --clang-completer --system-libclang
Advanced options for Ubuntu>Ubuntu, with Linux 5.3.0-28-generic
tbox@ubuntu:~http_proxy
http://http://dl-proxy.neusoft.com:8080/
tbox@ubuntu:~https_proxy
http://https://dl-proxy.neusoft.com:8080/
apt-get autoremove
https://gitee.com/mirrors/PyHamcrest.git
使用命令:lsb_release -a 查看系统版本
协助YouCompleteMe查找自定义头文件
add
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
to CMakeList.txt
生成compile_commonds.json
或者使用Bear生成compile_commonds.json
cscope -Rbkq
:cs add .
:cs show
:cs find c/g/i...
find Service/OTAService/ -name .c|xargs -i cat {}|grep -v -E ^\s$|wc -l
find Service/OTAService/ -name test.c|xargs -i cat {}|grep -v -E ^\s+$ > ~/tmp/test.c