Skip to content

Instantly share code, notes, and snippets.

@bds
Created November 14, 2015 20:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bds/0ca4103d5765a7ad687c to your computer and use it in GitHub Desktop.
Save bds/0ca4103d5765a7ad687c to your computer and use it in GitHub Desktop.
.vimrc
set nocompatible " We are using Vim
syntax on
" * PLUGINS
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'Shougo/neocomplete.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" * AUTOCOMPLETE
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1
" Use smartcase.
let g:neocomplete#enable_smart_case = 1
" Set minimum syntax keyword length.
let g:neocomplete#sources#syntax#min_keyword_length = 3
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
if has("autocmd")
" Enable omni completion.
autocmd FileType ruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby let g:rubycomplete_buffer_loading=1
autocmd FileType ruby let g:rubycomplete_classes_in_global=1
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
endif
hi Pmenu ctermfg=darkred ctermbg=white
" * RULER
set colorcolumn=80
set ruler
" * STATUS LINE
hi StatusLine ctermfg=0 ctermbg=3 cterm=bold " Window highlighting
hi StatusLineNC ctermfg=white ctermbg=4 cterm=none
" * CODE FOLDING
"
hi Folded ctermfg=244 ctermbg=0 cterm=none " Code folding highlight
set foldmethod=indent
set foldnestmax=10
set nofoldenable
set foldlevel=1
" * COMMENTS
"
hi Comment ctermfg=gray
" * TABS AND SPACES
"
set softtabstop=2
set tabstop=2
set shiftwidth=2
set expandtab
" * BRACKET MATCHING
set showmatch
" * HISTORY
"
set history=5000
" * NOTES
"
" Color test
" :runtime syntax/colortest.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment