Skip to content

Instantly share code, notes, and snippets.

@rish
Created May 24, 2016 10:09
Show Gist options
  • Save rish/e1845a730ae0e49a73f0e9d97aebc7ad to your computer and use it in GitHub Desktop.
Save rish/e1845a730ae0e49a73f0e9d97aebc7ad to your computer and use it in GitHub Desktop.
Sample vimrc
set nocompatible
execute pathogen#infect()
let mapleader = " "
set backspace=2
set nobackup
set nowritebackup
set noswapfile
set history=50
set ruler
set showcmd
set incsearch
set laststatus=2
set autowrite
syntax on
set t_Co=256
set background=dark
colorscheme spacegray
filetype plugin indent on
" set smartindent
" http://svn.python.org/projects/python/trunk/Misc/Vim/vimrc
augroup vimrcEx
autocmd!
autocmd BufRead,BufNewFile *.html.twig set tabstop=4|set shiftwidth=4|set expandtab|set softtabstop=4
autocmd BufRead,BufNewFile *.scss set tabstop=4|set shiftwidth=4|set expandtab|set softtabstop=4
"
" autocmd BufRead,BufNewFile *.md set filetype=markdown
" autocmd BufRead,BufNewFile *.py set tabstop=8|set shiftwidth=4|set expandtab
" autocmd BufRead,BufNewFile *.jade set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.html set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.hbs set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.css set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.scss set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.js set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.json set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.rb set tabstop=2|set shiftwidth=2|set expandtab
" autocmd BufRead,BufNewFile *.php set tabstop=4|set shiftwidth=4|set expandtab
"
augroup END
set number
set numberwidth=5
set foldmethod=indent
set foldlevel=99
set modeline
set modelines=5
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smartcase
" Add red marks to trailing white space
" http://ertius.org/blog/highlighting-trailing-whitespace-in-vim/
"highlight ExtraWhitespace ctermbg=red guibg=red
"autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
set list lcs=trail:·,tab:»·
hi SpecialKey ctermfg=red
" Set StatusLine colours
" highlight StatusLine ctermbg=white ctermfg=black
highlight StatusLine ctermbg=white
" Add nerdtree only for Macvim
if has('gui_running')
autocmd vimenter * NERDTree
set guioptions-=L " Disables scroll bar inside of NERDTree
let g:NERDTreeWinSize=40 " Set NerdTree window width
endif
" vim-javascript
let g:javascript_enable_domhtmlcss = 1
" vim-jsx
let g:jsx_ext_required = 0
" airline
let g:airline_powerline_fonts = 1
let g:airline_theme = 'bubblegum'
" CtrlP
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_follow_symlinks = 1
let g:ctrlp_max_depth = 100
let g:ctrlp_working_path_mode = 'c'
" REMAP
:map K <Nop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment