配置c++ 等编程语言补全等

from blog http://www.cnblogs.com/xiaobo-Linux/p/8909402.html

1. 安装 macvim

brew install macvim

将vim替换为mvim

alias vim='mvim -v'

2.安装Vundle

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim

输入 vim

shift + :

输入

:PluginInstall

自动安装 YouCompleteMe

3.安装cmake

brew install CMake

4.配置YouCompleteMe

cd ~/.vim/bundle/YouCompleteMe
安装所有编程语言支持
./install.py --all

5. vim .vimrc

" Set vundle settings here
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
set nocompatible " be iMproved, 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 'VundleVim/Vundle.vim' "https://github.com/VundleVim/Vundle.vim
Bundle 'Valloric/YouCompleteMe'
Plugin 'gmarik/Vundle.vim'
" Custom plugins
Plugin 'scrooloose/nerdtree' "https://github.com/scrooloose/nerdtree
Plugin 'MattesGroeger/vim-bookmarks' "https://github.com/MattesGroeger/vim-bookmarks
Plugin 'maciakl/vim-neatstatus' "https://github.com/maciakl/vim-neatstatus " All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line " Vim5 and later versions support syntax highlighting. Uncommenting the
" following enables syntax highlighting by default.
if has("syntax")
syntax on " 语法高亮
endif
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"have Vim load indentation rules and plugins according to the detected
"filetype on
"filetype plugin indent on
endif set number
set autoindent
set softtabstop= " 设置软制表符的宽度
set shiftwidth= " (自动) 缩进使用的4个空格
set tabstop= " 设置制表符(tab键)的宽度
set expandtab " 行首tab转换为4个空格
set cindent " 使用 C/C++ 语言的自动缩进方式
set cinoptions={,1s,t0,n-,p2s,(03s,=.5s,>1s,=1s,:1s "设置C/C++语言的具体缩进方式
set showmatch " 设置匹配模式,显示匹配的括号
set linebreak " 整词换行
set whichwrap=b,s,<,>,[,] " 光标从行首和行末时可以跳到另一行去
set ruler " 标尺,用于显示光标位置的行号和列号,逗号分隔。每个窗口都有自己的标尺。如果窗口有状态行,标尺在那里显示。否则,它显示在屏幕的最后一行上
set showcmd " 命令行显示输入的命令
set showmode " 命令行显示vim当前模式
set incsearch " 输入字符串就显示匹配点
set enc=utf- " 文件编码
set cursorline
highlight CursorLine cterm=NONE ctermbg=blue ctermfg=white guibg=NONE guifg=NONE
" highlight CursorColumn cterm=NONE ctermbg=green ctermfg=NONE guibg=NONE guifg=NONE " NERDTree settings
autocmd StdinReadPre * let s:std_in=
autocmd VimEnter * if argc() == && !exists("s:std_in") | NERDTree | endif " vim-bookmarks settings
let g:bookmark_auto_close =
let g:bookmark_save_per_working_dir =
let g:bookmark_highlight_lines =
let g:bookmark_center =
let g:bookmark_location_list = " key mapping
:inoremap { {}<ESC>i
:map <f2> :NERDTreeToggle<CR>

Mac vim“装逼”配置的更多相关文章

  1. code-server服务端开发利器,再也不用vim装逼了!!!

    一直有个需求,就是万不得已在服务修改代码的时候能有个好的工具,至少比vim要强吧!虽然vim也还行,但是如果比vscode那一定是差了点!这个微软洗心革面的新工具着实不错!从刚开始的鄙视到真香我用了不 ...

  2. vim插件和配置

    vim插件和配置 插件 pathogen 可以方便地管理vim插件 在没有pathogen的情况下,vim插件的文件全部都放在.vim目录,卸载插件很麻烦,pathogen可以将不同的插件放在一个单独 ...

  3. MySQL Mac 终端环境变量配置

    MySQL Mac 终端环境变量配置 这里安装的是mysql-8.0.26-macos11-x86_64,M1Mac,原本打算安装arm64版本,但一直安装不了,就装了x86版本 安装完成MySQL之 ...

  4. 一网成擒全端涵盖,在不同架构(Intel x86/Apple m1 silicon)不同开发平台(Win10/Win11/Mac/Ubuntu)上安装配置Python3.10开发环境

    原文转载自「刘悦的技术博客」https://v3u.cn/a_id_200 时光荏苒,过隙白驹,即将进入2022年,著名敏捷开发语言Python也放出了3.10最终版,本次我们来展示一下在不同的系统和 ...

  5. vim + ctags + taglist配置和使用

    vim +ctags + taglist ,ctags+cscope 安装配置和使用 内容:VIM下ctags和taglist的安装配置方法:一键安装 ctags和cscope的方法 :vim语法高亮 ...

  6. Xamarin Studio在Mac环境下的配置和Xamarin.iOS常用控件的示例

    看过好多帖子都是Win环境装XS,Mac只是个模拟器,讲解在Mac环境下如何配置Xamarin Studio很少,也是一点点找资料,东拼西凑才把Xamarin Studio装在Mac上跑起来,如下: ...

  7. 关于NGINX的502的装逼打怪之路

    写日志之前先copy一段nginx502的原因,从某网看到如下,然而这并不是重点,最重要还是看博主手敲的东西. 一.NGINX 502错误排查 NGINX 502 Bad Gateway错误是Fast ...

  8. 前端 JSer 装逼手册

    阅读 8143收藏 2352016-7-18 SegmentFault 分享:吉祥物 @ SegmentFault 在装逼成本越来越高的 JS 圈,是时候充值一下了 -- 题记. 作者:kenberk ...

  9. (转) mac 下的eclipse 配置 python 2.7

    原地址: http://marsfreewill.blogspot.it/2012/08/mac-ospythonpydeveclipse.html   在MAC OS上配置Python开发环境(Py ...

随机推荐

  1. Shiro笔记(二)身份验证

    Shiro笔记(二)身份验证 一.核心代码 @Test public void helloWorldTest(){ IniSecurityManagerFactory factory = new In ...

  2. 用Canvas做视频拼图

    声明:本文为原创文章,如需转载,请注明来源WAxes,谢谢! 几天前同事给我看了一个特效,是一个拼图游戏,不同的是,拼图里的是动画.他让我看下做个DEMO,于是就自己整了一会,也确实不难.用canva ...

  3. redis 在 php 中的应用(Connection [ 连接] 篇)

    本文为我阅读了 redis参考手册 之后编写,注意 php_redis 和 redis-cli 的区别(主要是返回值类型和参数用法) 目录: Connection(连接) AUTH ECHO PING ...

  4. vscode调试C/C++时支持查看定义查看引用

    貌似老版支持现在不支持了,需要自己加第三方工具,方法如下: 确保你安装了c/c++,此文写作时版本为0.20.1 从GTAGS官网下载Win32程序,解压,将其放在合适的位置,并把其目录下/bin文件 ...

  5. MyEclipse设置文件的编码格式

    在MyEclipse中复制properties文件的时候,发现一个问题,在EditPlus中打开文件中文可以正常显示,并且是UTF-8的编码格式. 但是将这个文件复制到MyEclipse中再打开时,中 ...

  6. ProxySQL

    ProxySQL   http://www.proxysql.com/

  7. uva 10816 Travel in Desert(简单的好题~两种方法)

    题意: 给出 一个图 点与点之间的路径上有两个权值 路径长度和温度 要求在所走路径中的温度的最大值最小的前提下 走最短路径 解题思路1: 首先用 最小生成树 的方法走出 最小瓶颈路 .把在这期间用到的 ...

  8. 关于php开发中的字符编码问题总结的几个要点

    用php这么久,今天终于要彻底总结下php乱码问题,因为实在是吃过不少亏啊 1:header("content-type:text/html;charset=utf-8")或者&l ...

  9. orm Lite的使用

    1.什么是ORM Lite orm Lite(Object Relationanl Mapping Lite)是一种用于持久化保存java对象的框架,相对于标准的ORM包来说. 2. Demo ●声明 ...

  10. AngularJS中自定义有关一个表格的Directive

    本篇体验在AngularJS中自定义一个有关表格的Directive.表格的需求包括: ● 表格结构 <table>    <thead>        <tr>  ...