Skip to content

Instantly share code, notes, and snippets.

@Xronger
Last active August 29, 2015 14:11
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 Xronger/37284a99998708fa50ac to your computer and use it in GitHub Desktop.
Save Xronger/37284a99998708fa50ac to your computer and use it in GitHub Desktop.
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 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'mileszs/ack.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'Raimondi/delimitMate'
Plugin 'scrooloose/nerdtree'
Plugin 'bling/vim-airline'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'rizzatti/dash.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'Yggdroot/indentLine' "公司机器上不要此插件
Plugin 'jisaacks/GitGutter' "公司机器上不要此插件
Plugin 'scrooloose/syntastic'
Plugin 'Valloric/YouCompleteMe'
Plugin 'majutsushi/tagbar'
Bundle 'ervandew/supertab'
call vundle#end() " required
filetype plugin indent on " required
"【VIM通用设置】
cd /Users/H1ac0k/Dropbox/meitu
"主题设置
colorscheme molokai
let g:molokai_original = 1
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h12
"设置行号
set nonu
"
""自动缩进
set autoindent
"设置历史命令条数
set history=50
"
""总在 Vim 窗口的右下角显示当前光标位置
set ruler
"tab长度
set ts=4
set sw=4
set expandtab "开启Tab转空格的操作
set tabstop=4 "Tab表示成4个空格
"
""高亮行
set cursorline
"去掉左右边的滚动条
set guioptions-=L
set guioptions-=r
"实时搜索
set incsearch
set list lcs=tab:\|\
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
" better key bindings for UltiSnipsExpandTrigger
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
" 取消自动换行
set nowrap
" 自动保存设置
au FocusLost * silent! up " vim 窗口失去焦点时保存
au BufLeave * silent! up " vim buffer 切换时自动保存
"【插件】NERDTree 配置
nmap <silent> <C-B> :NERDTreeToggle<CR>
"【插件】ctags 配置
let Tlist_Ctags_Cmd="/usr/local/bin/ctags"
"【插件】airline 配置
let g:airline#extensions#whitespace#enabled = 0
let g:airline_powerline_fonts = 1
let g:airline_theme = "molokai"
set encoding=utf-8
set laststatus=2
set encoding=utf-8
"【插件】tagbar 配置
let g:tagbar_autofocus = 1
let g:tagbar_autoclose = 1
nmap <silent> <C-N> :TagbarToggle<CR>
" 【插件】supertab 配置
let g:SuperTabDefaultCompletionType="context"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment