Skip to content

Instantly share code, notes, and snippets.

@seveniu
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save seveniu/4e1e4cba39bfaf05a840 to your computer and use it in GitHub Desktop.

Select an option

Save seveniu/4e1e4cba39bfaf05a840 to your computer and use it in GitHub Desktop.
my vimrc
set nocompatible " be iMproved, required
filetype off " required
" Vundle
" https://github.com/gmarik/vundle
"
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
"Plugin 'gmarik/vundle'
Plugin 'mattn/emmet-vim'
Plugin 'kien/ctrlp.vim'
Plugin 'vimcn/ctrlp.cnx'
Plugin 'AutoClose'
Plugin 'SuperTab'
Plugin 'The-NERD-tree'
Plugin 'The-NERD-Commenter'
Plugin 'EasyGrep' "全局查找替换
Plugin 'flazz/vim-colorschemes'
Plugin 'Lokaltog/vim-powerline'
Plugin 'pangloss/vim-javascript'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-lua-ftplugin'
"开启折叠
let b:javascript_fold=1
"启用对dom html css高亮支持
let javascript_enable_domhtmlcss=1
"Plugin 'benjaminwhite/Benokai'
"Plugin 'fsouza/go.vim'
"Plugin 'wting/rust.vim'
"Plugin 'godlygeek/tabular'
"Plugin 'plasticboy/vim-markdown'
"Plugin 'mtth/scratch.vim'
"Plugin 'greplace.vim'
" Track the engine.
Plugin 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="HH"
let g:UltiSnipsListSnippets="<c-l>"
" 用 ctrl h 注释
map <c-h> \c<space>
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
call vundle#end()
set nu
" 语法高亮
syntax on
set encoding=utf-8
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
filetype on
filetype plugin on
filetype plugin indent on
" 禁止光标闪烁
set gcr=a:block-blinkon0"
" 配色方案
"colorscheme torte
set background=dark
"colorscheme solarized
"colorscheme molokai
"colorscheme phd
colorscheme atom
" 字体
if has('win32')
elseif has('unix')
set guifont=Monospace\ 11
elseif has('mac')
set guifont=Menlo\ Regular:h16
endif
" 在状态行上显示光标所在位置的行号和列号
set ruler
" 高亮显示匹配的括号
set showmatch
" 在搜索时,输入的词句的逐字符高亮(类似firefox的搜索)
set incsearch
" 不要高亮被搜索的句子(phrases)
set hlsearch
" 总是显示状态栏
set laststatus=2
" 高亮显示当前行
set cursorline
" 高亮显示当前列
"set cursorcolumn
" 为C程序提供自动缩进
set smartindent
" 使用C样式的缩进
set cindent
" 制表符为4
set tabstop=4
" 统一缩进为4
set softtabstop=4
set shiftwidth=4
" 要用空格代替制表符
set expandtab
" 禁止换行
set nowrap
" 在行和段开始处使用制表符
""set smarttab
" 光标移动到buffer的顶部和底部时保持3行距离
set scrolloff=3
" 在被分割的窗口间显示空白,便于阅读
set fillchars=vert:\ ,stl:\ ,stlnc:\
"set backupdir=~/.vim/backup/
"set directory=~/.vim/backup/
" 自动保存 , 每五秒自动保存
let autosave=5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment