Skip to content

Instantly share code, notes, and snippets.

@eagleon
Created December 26, 2012 01:18
Show Gist options
  • Save eagleon/4376948 to your computer and use it in GitHub Desktop.
Save eagleon/4376948 to your computer and use it in GitHub Desktop.
MacVim环境文件配置。 brew install ctags
" =========
" 功能函数
" =========
" 获取当前目录
func GetPWD()
return substitute(getcwd(), "", "", "g")
endf
" =========
" 环境配置
" =========
" 保留历史记录
set history=400
" 命令行于状态行
set ch=1
set stl=\ [File]\ %F%m%r%h%y[%{&fileformat},%{&fileencoding}]\ %w\ \ [PWD]\ %r%{GetPWD()}%h\ %=\ [Line]\ %l,%c\ %=\ %P
set ls=2 " 始终显示状态行
" 制表符
set tabstop=4
set expandtab
set smarttab
set shiftwidth=4
set softtabstop=4
" 显示行号
set nu
"设置文件打开默认编码格式
set fileencodings=ucs-bom,utf-8,cp936,gb2312,gb18030,big5,euc-jp,euc-kr,latin1
"在查找时忽略大小写
set ignorecase
set incsearch
set hlsearch
"显示匹配的括号
set showmatch
"实现全能补全功能,需要打开文件类型检测
"filetype plugin indent on
"打开vim的文件类型自动检测功能
filetype on
"设置字体
set guifont=Monaco:h14
"美化
if has("gui_running")
set go=aAce " 去掉难看的工具栏和滑动条
set transparency=10 " 透明背景
set guifont=Monaco:h14 " 设置默认字体为monaco
set showtabline=2 " 开启自带的tab栏
set columns=140 " 设置宽
set lines=40 " 设置长
endif
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-rails.git'
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'ZenCoding.vim'
Bundle 'AutoComplPop'
Bundle 'Gist.vim'
Bundle 'WebAPI.vim'
Bundle 'The-NERD-tree'
Bundle 'git://git.wincent.com/command-t.git'
" ...
filetype plugin indent on " required!
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment