MAC下的IDE实在是不好用,最终放弃了IDE准备直接用vim来看代码了,那么就需要设置一下vim。

将家目录下面.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 " 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>

然后手动下载如下文件:

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

之后在打开的vim中输入:PluginInstall来安装相应的插件,等待完成后就可以使用了。

配置好的环境如下图所示:

搭建MAC下vim环境的更多相关文章

  1. Mac下PHP环境的搭建

    Mac下PHP环境的搭建 目录 Mac下PHP环境的搭建(基于XAMPP) phpmyadmin Mac下PHP环境的搭建(基于XAMPP) 下载XAMPP的Mac版 启动Apache Web Ser ...

  2. RF+Appium框架自动化测试系列一之(Mac下Appium环境搭建)万事开头难

    消失了3个月,有一段时间没来园子更新博客了,各位看官见谅哈哈,消失是因为刚换了工作环境没外网,好多笔记没能及时的记录分享,以后有时间慢慢补上吧,这段时间主要接触了移动端app的自动化测试,公司为了快速 ...

  3. Mac 下VIM配置

    Mac下VIM配置 首先,我们去这里下载MacVim,也可用这个网址:(http://code.google.com/p/macvim/),进入后的界面如下: ____________________ ...

  4. Mac下修改环境变量

    Mac下修改环境变量 如果使用默认Bash, 首先修改 ~/.bash_profile 文件,添加文件路径,比如: export PATH=~/bin:/usr/local/bin/node:~/Do ...

  5. Mac下Vim编辑快捷键小结(移动光标)

    Mac下Vim编辑快捷键小结(移动光标) 1.移动到行尾"$",移动到行首"0"(数字),移动到行首第一个字符处"^" 2.移动到段首&qu ...

  6. mac下python环境pip报错[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) 的解决方法

    1.mac下python环境pip报错: issuserdeMacBook-Pro:~ issuser$ pip install pyinstallerCollecting pyinstaller  ...

  7. 在mac下设置环境变量

    在mac下设置环境变量   在基于unix/linux的操作系统下进行程序开发,使用环境变量将会方便.通过设置环境变量将可以在任意目录通过输入程序名来执行设定目录下的程序.不需要通过cd将工作目录改变 ...

  8. Mac下Boost环境搭建

    Boost,一个功能强大.跨平台.开源而且免费的C++程序库,可以在其官网了解更多:http://www.boost.org,C++标准经过不断的升级完善,现在已经功能越来越吸引人了,Boost开发过 ...

  9. mac下wordpress环境搭建

    mac下本来就有apache和php,只需要配置以下+安装mysql 1.Apache 预装目录在  /etc/apache2: 默认的网站目录在 /Library/WebServer/Documen ...

随机推荐

  1. Node FS 读取文件中文乱码解决

    1:首先保证源文件编码方式为UTF-8 2:读取代码,设置编码方式rs.setEncoding('utf8') var fs = require('fs'); var rs = fs.createRe ...

  2. tomcat启用压缩的方式

    <Connector port="7070" protocol="HTTP/1.1"connectionTimeout="20000" ...

  3. VB LISTBOX属性

    additem 添加属性 listcount总记录数 listindex索引值 Private Sub Form_Load()List1.AddItem "广东省广州市"List1 ...

  4. vue 项目的开发流程

    1.$ node -v (检测node版本,node版本需要在 V4 以上) 2.全局安装vue $ npm install -g vue 3.安装脚手架 $ npm install -g vue-c ...

  5. python之函数用法__str__()

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #python之函数用法__str__() #http://www.cnblogs.com/hongfei/p ...

  6. Linux 系统使用 iso 镜像文件或光盘配置本地YUM 源的最简单方式

    1.分配光驱 选择本地的iso系统镜像文件,或者在光驱中放入系统安装盘.之后,在桌面可以看到RHEL-7.2-Server的光盘图标. 2.查看光驱挂载的位置 使用df -h 命令可以看到光驱或镜像文 ...

  7. 如何在 Linux 下调试动态链接库

    大家都知道在 Linux 可以用 gdb 来调试应用程序,当然前提是用 gcc 编译程序时要加上 -g 参数.我这篇文章里将讨论一下用 gdb 来调试动态链接库的问题. 首先,假设我们准备这样的一个动 ...

  8. 微信小程序-基于canvas画画涂鸦

    代码地址如下:http://www.demodashi.com/demo/14461.html 一.前期准备工作 软件环境:微信开发者工具 官方下载地址:https://mp.weixin.qq.co ...

  9. 工具-VIM配置

    设置缩进的空格数 shiftwidth=4 设置制表符宽度 tabstop=4 高亮显示当前行 cursorline 高亮显示当前列 cursorcolumn

  10. java 运行时环境和编译器环境

    必须要保证运行环境高于编译环境 1.编译器的环境设置 单击项目右键-> Properties -> Java Compiler -> 5或6 如果编译器的环境高于运行时环境会报错. ...