搭建MAC下vim环境
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环境的更多相关文章
- Mac下PHP环境的搭建
Mac下PHP环境的搭建 目录 Mac下PHP环境的搭建(基于XAMPP) phpmyadmin Mac下PHP环境的搭建(基于XAMPP) 下载XAMPP的Mac版 启动Apache Web Ser ...
- RF+Appium框架自动化测试系列一之(Mac下Appium环境搭建)万事开头难
消失了3个月,有一段时间没来园子更新博客了,各位看官见谅哈哈,消失是因为刚换了工作环境没外网,好多笔记没能及时的记录分享,以后有时间慢慢补上吧,这段时间主要接触了移动端app的自动化测试,公司为了快速 ...
- Mac 下VIM配置
Mac下VIM配置 首先,我们去这里下载MacVim,也可用这个网址:(http://code.google.com/p/macvim/),进入后的界面如下: ____________________ ...
- Mac下修改环境变量
Mac下修改环境变量 如果使用默认Bash, 首先修改 ~/.bash_profile 文件,添加文件路径,比如: export PATH=~/bin:/usr/local/bin/node:~/Do ...
- Mac下Vim编辑快捷键小结(移动光标)
Mac下Vim编辑快捷键小结(移动光标) 1.移动到行尾"$",移动到行首"0"(数字),移动到行首第一个字符处"^" 2.移动到段首&qu ...
- 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 ...
- 在mac下设置环境变量
在mac下设置环境变量 在基于unix/linux的操作系统下进行程序开发,使用环境变量将会方便.通过设置环境变量将可以在任意目录通过输入程序名来执行设定目录下的程序.不需要通过cd将工作目录改变 ...
- Mac下Boost环境搭建
Boost,一个功能强大.跨平台.开源而且免费的C++程序库,可以在其官网了解更多:http://www.boost.org,C++标准经过不断的升级完善,现在已经功能越来越吸引人了,Boost开发过 ...
- mac下wordpress环境搭建
mac下本来就有apache和php,只需要配置以下+安装mysql 1.Apache 预装目录在 /etc/apache2: 默认的网站目录在 /Library/WebServer/Documen ...
随机推荐
- PHP Mysql-连接
PHP 连接 MySQL PHP 5 及以上版本建议使用以下方式连接 MySQL : MySQLi extension ("i" 意为 improved) PDO (PHP Dat ...
- Java从零开始学二十九(大数操作(BigIntger、BigDecimal)
一.BigInteger 如果在操作的时候一个整型数据已经超过了整数的最大类型长度long的话,则此数据就无法装入,所以,此时要使用BigInteger类进行操作. 不可变的任意精度的整数.所有操作中 ...
- Mapreduce实例-分组排重(group by distinct)
public class GroupComparator implements RawComparator<MyBinaryKey> { @Override public int comp ...
- 小程序target与currentTarge区别
文章来源:刘俊涛的博客 欢迎关注,有问题一起学习欢迎留言.评论
- 转:C#委托与事件
委托与事件 Ganesh Nataraj最近写了一篇解释委托与事件的文章,在坊间流传较广,今天翻译成中文与大家共享,如有不妥之处,欢迎留言讨论. C#中的委托类似于C或C++中的函数指针. ...
- Openerp 7 view画面编辑/创建/删除/复制功能控制
OpenERP 7.0中,Tree或Form画面上可以添加属性create edit delete,用于控制Create.Delete.Edit.Duplicate功能是否显现.如下例:<for ...
- 动态布局中RadioGroup的RadioButton有时候不相互排斥的原因
近期在做一个答题类的模块,有单选.简答.调查问卷等,我是用动态布局的方式生成答题项的.在弄单选的时候遇到一个比較奇葩的问题,在代码中生成RadioGroup和RadioButton的时候.会发现不能相 ...
- 【redis】常用命令
三.常用命令 1)连接操作命令 quit:关闭连接(connection) auth:简单密码认证 help cmd: 查看cmd帮助,例如:help quit ...
- 【转载】delphi下如何复制文件
1. CopyFile(PChar(源目录),PChar(目标目录),True); CopyFileTo('F:\MyProject\delphi\message\data\data.mdb','c: ...
- JSEclipse—Eclipse上的JavaScript开发工具
http://blog.csdn.net/qiaogang2003/article/details/3035056原来js开发仅仅使用ue,不过开发效率比较低下. 找到一个Eclipse下的js开发工 ...