Skip to content

Instantly share code, notes, and snippets.

@verma
Last active April 19, 2016 15:56
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 verma/5b6c57751d734a492e9d to your computer and use it in GitHub Desktop.
Save verma/5b6c57751d734a492e9d to your computer and use it in GitHub Desktop.
Most recent .vimrc
" Enable syntax highlighting
" and apply our nice color theme
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'groenewege/vim-less'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/syntastic.git'
Plugin 'bling/vim-airline'
Plugin 'airblade/vim-gitgutter'
Plugin 'chriskempson/base16-vim'
call vundle#end()
syntax enable
filetype on
filetype indent on
filetype plugin on
set ls=2
set tabstop=4
set shiftwidth=4
set hlsearch
set incsearch
set visualbell t_vb=
set novisualbell
set number
"set expandtab
set softtabstop=4
set ruler
set hidden
set autoindent
set title
set vb
set linespace=0
set scrolloff=3
if has("gui_win32")
set backupdir=$TEMP,$TMP,.
set directory=$TEMP,$TMP,.
else
set backupdir=~/.vim/tmp,/tmp
set directory=~/.vim/tmp,/tmp
endif
set backspace=indent,eol,start
let mapleader=","
" Setup emacs style indentation
"
"set cinoptions={1s,>2s,e-1s,^-1s,n-1s,:1s,p5,i4,(0,u0,W1s shiftwidth=4
" Key Mappings
" " """"""""""""""""""""""""""""""""""
" Mappings to access buffers (don't use ",p" because a
" delay before pressing "p" would accidentally paste).
" ,l : list buffers
" ,b ,f ,g : go back/forward/last-used
" ,1 ,2 ,3 : go to buffer 1/2/3 etc
nnoremap <leader>l :ls<CR>
nnoremap <leader>b :bp<CR>
nnoremap <leader>f :bn<CR>
nnoremap <leader>g :e#<CR>
nnoremap <leader>1 :1b<CR>
nnoremap <leader>2 :2b<CR>
nnoremap <leader>3 :3b<CR>
nnoremap <leader>4 :4b<CR>
nnoremap <leader>5 :5b<CR>
nnoremap <leader>6 :6b<CR>
nnoremap <leader>7 :7b<CR>
nnoremap <leader>8 :8b<CR>
nnoremap <leader>9 :9b<CR>
nnoremap <leader>0 :10b<CR>
nnoremap <C-t> :CtrlP<CR>
" It's useful to show the buffer number in the status line.
set laststatus=2 statusline=%02n:%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
" This beauty remembers where you were the last time you edited the file, and returns to the same position.
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
"let g:Powerline_symbols = 'fancy'
" show whitespaces
set listchars=tab:▸\ ,eol:¬
" syntax checkers
let g:syntastic_javascript_checkers = ['jshint']
let g:syntastic_cpp_compiler = 'clang++'
let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++'
" Clojure fuzzy intend stuff
" " Default
let g:clojure_fuzzy_indent = 1
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let', '^om']
let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
" My own stuff to make things easy
"
function s:DayTime()
set background=light
colorscheme base16-bright
highlight NonText guifg=#E0DEDA
highlight SpecialKey guifg=#E0DEDA
endfunction
function s:NightTime()
set background=dark
colorscheme base16-eighties
highlight NonText guifg=#444444
highlight SpecialKey guifg=#444444
endfunction
command! -bar DayTime call s:DayTime()
command! -bar NightTime call s:NightTime()
if has("gui_running")
DayTime
set guifont=PT\ Mono:h15
set antialias
set go-=T
" in GUI mode, make sure that clojure files have a good amount of line
" spacing
au FileType clojure setl linespace=6
elseif &t_Co == 256
NightTime
else
colorscheme desert
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment