Skip to content

Instantly share code, notes, and snippets.

@NinoFocus
Created December 16, 2014 15:48
Show Gist options
  • Save NinoFocus/00d727c1fee0a1540267 to your computer and use it in GitHub Desktop.
Save NinoFocus/00d727c1fee0a1540267 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" vundle
Plugin '[email protected]:gmarik/Vundle.vim.git'
" powerline
Plugin '[email protected]:Lokaltog/vim-powerline.git'
" javascript
Plugin '[email protected]:pangloss/vim-javascript.git'
" sass
Plugin '[email protected]:cakebaker/scss-syntax.vim.git'
" emmet
Plugin '[email protected]:mattn/emmet-vim.git'
" multiple cursors
Plugin '[email protected]:terryma/vim-multiple-cursors.git'
Plugin '[email protected]:scrooloose/nerdtree.git'
call vundle#end() " required
filetype plugin indent on " required
" 文本编码设置
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
"中文编码 GBK
set encoding=utf-8 "将vim的内部编码格式变为utf-8,这样vim识别文件正确的准确性会提高很多
set fileencoding=utf-8 "当新建一个文档的时候,默认编码是UTF-8
" 编辑显示设置
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
set go= "去掉边框
set number "显示行号
set incsearch "搜索关键词高亮
set hlsearch
syntax on "设置语法高亮
set nowrap "关闭自动折行
set autoread "当文件在外部被改变时,自动加载
" 关闭文件备份,因为大多数东西都是在SVN,GIT上的
set nobackup
set nowb
set noswapfile
" 设置缩进空格数
set tabstop=4 "表示一个tab显示出来是多少个空格,默认为8
set softtabstop=4 "在编辑的时候(比如按退格或tab键)一个tab是多少个空格
set shiftwidth=4 "每一级缩进是多少空格
set expandtab "将tab扩展成空格; noepandtab 不扩展;
set autoindent "自动缩进
set smartindent
" 插件设置
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
filetype on
filetype plugin on
filetype indent on
" color and font
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
colorscheme molokai
set guifont=Source\ Code\ Pro\:h15
" powerline
let g:Powerline_symbols = 'unicode'
set laststatus=2
" programming
" Ruby
au FileType ruby nmap<buffer> <leader>r :!ruby "%"<CR>
au FileType ruby set tabstop=2
au FileType ruby set softtabstop=2
au FileType ruby set shiftwidth=2
" SASS
au BufRead,BufNewFile *.scss set filetype=scss.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment