1.Windows端登录方式:
1.1.网页登录方式,WebShell为腾讯云推荐的登录方式: 登录腾讯云账号后,打开“云产品”->“云服务器”->“实例”,登录就是相应的WebShell界面
1.2.客户端登录方式:考虑的原则是开源或免费,最后用Putty 和 MobaXterm组合,而其它如XShell虽公司帮购买了,但不用公司的电脑时不方便,功能上基本上XShell有的都有
2. 安装最新的ycm插件对vim、python版本有要求且后面的ycm版本不再支持python2,下面截图来自ycm 的README.md
3.安装 python2, python3, 用yum源安装即yum install python-devel.x86_64 && yum install python36-devel.x86_64
3.1.大致查看当前python相关内容:whereis, rqm -qa python
3.2.查看yum源是否有python的devel版本
3.3.安装python2, python3: yum install python-devel.x86_64 && yum install python36-devel.x86_64
4. 安装新版vim
4.1. git 下载vim: git clone https://github.com/vim/vim ./vim
4.2. 配置vim: 使vim支持 python2 和python3, 配置如下
4.2.1 清理配置: make distclean
4.2.1对python2.7的支持参数:
--enable-pythoninterp
--with-python-config-dir=/usr/lib64/python2.7/config
4.2.2 对python3.6的支持参数:
--enable-python3interp --with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu
注--with-python-config-dir的路径必须正确,相应文件夹里面含有Makefile 和so库
使用命令:whereis python 找到的是python的大致位置,具体路径可简单找一下
4.3 编译和安装:make &&make install
4.4 查看vim版本及对python的支持: vim --version
注: +python/dyn, +python3/dyn有相应的符号”+” 才表示支持相应功能
5.Vundle插件下载安装,Vundle为vim插件管理插件:
5.1.下载:从https://github.com/VundleVim/Vundle.vim.git中 clone到 vim插件位置:~/.vim/bundle/Vundle.vim
5.2. 在.vimrc中加入Vundle配置:把Vundle.vim/test中的minirc.vim内容添加到.vimrc里去
5.3. 下载新的插件放在~/.vim/bundle/下,再在.vimrc里面的vundle#begin()与vundle#end() 之间加上插件目录
5.4. 安装vim插件:vim +PluginInstall
6.安装YouCompleteMe插件
6.1.下载YouCompleteMe插件
git clone https://github.com/Valloric/YouCompleteMe ~/.vim/bundle/YouCompleteMe
6.2. 更新submodules, ~/.vim/bundle/YouCompleteMe目录下执行:
git submodule update --init --recursive
6.3.安装:python3 install.py --clang-completer,注使用python3, 对其它语言的支持自己加上
注:https://github.com/ycm-core/ycmd里的安装说明:
6.4.配置.ycm_extra_conf.py且在.vimrc中添加相应的配置变量
6.4.1.拷贝
~/.vim/bundle/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py 到~/.vim/下, 在.ycm_extra_conf.py里增加自己所需要ycm补充的头文件
6.4.2. 在.vimrc中添加相应的配置变量,如下:
7. 比较常用插件可参与github上的,排名比较靠前的都是比较实用,个人比较常用用的:ctags, tagbar, cscope, nerdtree, grep, a.vim,ycm等
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有