vim 自动补全功能:
记录下自己的YouCompleteMe安装步骤:
vim没有代码自动补全功能是非常不爽的。
1、先明确一点: MAC 自带的VIM 是7.3版本,而YouCompleteMe安装需要7.3版以上的vim。
使用MAC自带的vim安装YouCompleteMe会出现问题如下:
2、安装YouCompleteMe之前要先安装Budle插件(vundle插件):
vundle插件安装比较简单:
在$HOME/.vimrc 文件顶部贴入下列代码:
set nocompatible " required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required Plugin 'gmarik/Vundle.vim' " Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin) " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required
代码设置好之后,然后随便打开一个vim , 在命令模式下输入:
PluginInstall
自动安装插件, 会在$HOME/ 下生成一个 .vim 文件夹,
./vim/bundle/ 文件中是 安装的所有插件文件。
就可以使用Budle安装插件了。
Bundle 'Valloric/YouCompleteMe'
Bundle 语句必须在call vundle#begin()和call vundle#end()之间,不能放错位置。
然后随便打开一个vim , 在命令模式下输入:BundleInstall
就可以自动安装插件了。
3 、由于MAC自带的vim版本不够, 所有安装了MacVim,
使用homebrew进行安装:
brew install macvim
使用brew安装macvim成功之后,使用命令: brew linkapps macvim ,才会生成macvim 应用标志,(命令行 会有提示)
由于macvim 和 vim 使用的是同一个.vimrc 配置文件。(也可以设置成使用macvim 代替原来的vim,我没有这样设置)
在命令行中: mvim 可以打开macvim 界面。
要安装成功cd ~/.vim/bundle/YouCompleteMe
./install --clang-completer还要先安装一个CMake :
brew install CMake
都安装成之后。按照2中介绍的, 配置完,安装YouCompleteMe成功后会在$HOME/.vim/bundle 下生成YouCompleteMe文件夹,如下图所示:
执行一下命令安装自动补全功能:
cd ~/.vim/bundle/YouCompleteMe
./install.py —clang-completer : 带c语言补全功能./install.py -omnisharp-completer : C# 补全功能
./install.py -all 所有
PS: 附加几个相关链接
4、mac上截图快捷键:
shift + command + 4 : 自定义截图
shift + command + 3 : 全屏截图
5、vim --version , mvim --version 查看vim版本
6、安装过程中可能会出错误,仔细看安装的提示, 即使某一步安装成功了也要自习看安装提示,英语非常有用啊
转载于:https://www.cnblogs.com/generalLi/p/5877849.html
- 点赞
- 收藏
- 分享
- 文章举报
- vim基础学习之自动补全功能
- vim自动补全功能
- windows下用vim实现qt代码的自动补全功能
- 用vim实现C++代码的自动补全功能
- vim 自动补全功能
- 让vim支持c++代码自动补全功能。
- vim自动补全功能
- Redhat 5 下vim 配置 +自动补全功能
- windows下用vim实现qt代码的自动补全功能(zz)
- 辛星深入分析vim的自动补全功能以及vim的映射
- 让vim拥有和.net 2005 IDE一样的自动补全功能
- 如何在配置vim的(Python)代码自动补全功能
- vim自带的自动补全功能
- vim基础学习之自动补全功能
- Linux 快速配置 VIM 实现语法高亮 自动补全 自动缩进以及文件管理等功能
- vim下c++自动补全和类似source insight功能配置
- 启用 VIM 中的 Python 自动补全及提示功能
- 如何启用vim自带python自动补全功能
- 在VIM里面设置自动补全功能
- vim代码自动补全功能