Skip to content

Instantly share code, notes, and snippets.

@hashedhyphen
Last active November 18, 2016 04:50
Show Gist options
  • Save hashedhyphen/70d992bfbcc8abc5be72e3172bd2ca93 to your computer and use it in GitHub Desktop.
Save hashedhyphen/70d992bfbcc8abc5be72e3172bd2ca93 to your computer and use it in GitHub Desktop.
" Vundle.vim
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'Yggdroot/indentLine'
Plugin 'itchyny/lightline.vim'
Plugin 'othree/yajs.vim'
Plugin 'rust-lang/rust.vim'
call vundle#end()
filetype plugin indent on
" indentLine
let g:indentLine_enabled = 0
let g:indentLine_leadingSpaceEnabled = 1
let g:indentLine_leadingSpaceChar = '-'
let g:indentLine_color_term = 5
" lightline.vim
if !has('gui_running')
set t_Co=256
endif
" Helpers
function SetIndentWidthTo(width)
set autoindent
set smartindent
set expandtab
let &l:tabstop = a:width
let &l:softtabstop = a:width
let &l:shiftwidth = a:width
endfunction
" Default Settings
set encoding=utf-8
set nobackup
set viminfo=
set noundofile
set visualbell t_vb=
set noerrorbells
set colorcolumn=80
copen 6
au BufReadPre,BufNewFile * call SetIndentWidthTo(2)
colorscheme koehler
" File Specific Settings
au BufReadPre,BufNewFile *.c,*.cpp call SetIndentWidthTo(2)
au BufReadPre,BufNewFile *.py call SetIndentWidthTo(4)
au BufReadPre,BufNewFile *.md call SetIndentWidthTo(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment