Skip to content

Instantly share code, notes, and snippets.

@zikkeung
Created August 29, 2014 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zikkeung/0cf3dd27d266b7378532 to your computer and use it in GitHub Desktop.
Save zikkeung/0cf3dd27d266b7378532 to your computer and use it in GitHub Desktop.
set nocompatible " 设置不兼容VI
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'bling/vim-airline'
"Bundle 'kien/ctrlp.vim'
"Bundle 'scrooloose/nerdtree'
"Bundle 'vim-scripts/YankRing.vim'
Bundle 'majutsushi/tagbar'
"Bundle 'mileszs/ack.vim'
"Bundle 'scrooloose/syntastic'
"Bundle 'SirVer/ultisnips'
"Bundle 'xolox/vim-session'
"Bundle 'jiangmiao/auto-pairs'
"Bundle 'terryma/vim-multiple-cursors'
"Bundle 'tpope/vim-surround'
"Bundle 'scrooloose/nerdcommenter'
"Bundle 'miripiruni/CSScomb-for-Vim'
"自动补全
"Bundle 'myhere/vim-nodejs-complete'
"Bundle 'Shougo/neocomplcache'
Bundle 'othree/javascript-libraries-syntax.vim'
Bundle 'mattn/emmet-vim'
"Bundle 'marijnh/tern_for_vim'
"外观
Bundle 'abra/obsidian2'
"Bundle 'skammer/vim-css-color'
Bundle 'hail2u/vim-css3-syntax'
Bundle 'cakebaker/scss-syntax.vim'
Bundle 'pangloss/vim-javascript'
Bundle 'othree/html5.vim'
color obsidian2
set background=dark
set guifont=Source\ Code\ Pro\ for\ Powerline:h14
set showtabline=2 "显示标签栏 0: 从不 1: 大于1个时显示 2: 总是
set guioptions-=T
set guioptions-=r
set guioptions-=L
set guioptions-=b
set clipboard+=unnamed
"设置中文编码
set encoding=utf-8
set fileencodings=utf-8,gbk
set ff=unix "文件默认格式unix
set autochdir " 自动切换当前目录为当前文件所在的目录
filetype plugin indent on
syntax enable
syntax on
if exists("g:enable_mvim_shift_arrow")
let macvim_hig_shift_movement = 1 " mvim shift-arrow-keys
endif
"" 行控制
set linebreak " 英文单词在换行时不被截断
set wrap " 设置自动折行
" 关闭遇到错误时的声音提示
set noerrorbells
set novisualbell
" 行号和标尺
set ruler " 显示标尺
set number " 行号
" 搜索
set hlsearch " 高亮显示搜索的内容
set ignorecase " 搜索时无视大小写
set showmatch " Show matching bracets when text indicator is over them
set incsearch
set highlight " conflict with highlight current line
set smartcase
set confirm " prompt when existing from an unsaved file
"set history=1000
scrolling
set title " show file in titlebar
set ve=block "光标可以定位在没有实际字符的地方
set autowrite
set autoread " 当文件在外部被修改,自动更新该文件
if has('mouse')
set mouse=a " 设定在任何模式下鼠标都可用
endif
set showmode " display the current mode
" 插入模式下使用 <BS>、<Del> <C-W> <C-U>
set backspace=indent,eol,start
"切换buffer不用强制保存
set hidden
" 备份和缓存
set nobackup
set nowb
set noswapfile
set switchbuf=usetab,newtab " open new buffers always in new tabs
" 制表符(设置所有的tab和缩进为4个空格)
set autoindent
set smartindent
set smarttab
set tabstop=4 " tab width
set softtabstop=4 " backspace &
set shiftwidth=4 " 动缩进使用的空格数
set expandtab " 缩进使用空格
set diffopt+=iwhite,vertical " 忽略缩进的差异
set iskeyword+=_,$,@,%,#,- " 带有如下符号的单词不要被换行分割
set isk+=- " 将-连接符也设置为单词
" Disable output and VCS files
set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
set wildignore+=*/tmp/librarian/*,*/.vagrant/*,*/.kitchen/*,*/vendor/cookbooks/*
set wildignore+=*/tmp/cache/assets/*/sprockets/*,*/tmp/cache/assets/*/sass/*
set backupdir^=~/.vim/_backup// " where to put backup files.
set directory^=~/.vim/_temp// " where to put swap files.
" 打开文件时总是跳到最后光标所在的行
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"" => 插件配置
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" airline
set laststatus=2 " 始终显示状态行
let g:airline_theme='powerlineish'
let g:airline_powerline_fonts=1
"let g:airline_right_sep=''
"tagbar
let g:tagbar_type_css = {
\ 'ctagstype' : 'Css',
\ 'kinds' : [
\ 'c:classes',
\ 's:selectors',
\ 'i:identities'
\ ]
\ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment