Skip to content

Instantly share code, notes, and snippets.

@verma
Created October 21, 2014 18:18
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/0600c9fce84b29a21e6f to your computer and use it in GitHub Desktop.
Save verma/0600c9fce84b29a21e6f to your computer and use it in GitHub Desktop.
" Enable syntax highlighting
" and apply our nice color theme
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/vundle'
Plugin 'derekwyatt/vim-scala'
Plugin 'vim-scripts/gitignore'
Plugin 'pangloss/vim-javascript'
Plugin 'vim-ruby/vim-ruby'
Plugin 'digitaltoad/vim-jade'
Plugin 'groenewege/vim-less'
Plugin 'tpope/vim-rails'
Plugin 'kien/ctrlp.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'petRUShka/vim-opencl'
Plugin 'vim-scripts/Son-of-Obisidian'
Plugin 'wting/rust.vim'
Plugin 'goatslacker/mango.vim'
Plugin 'jaromero/vim-monokai-refined'
Plugin 'junegunn/seoul256.vim'
Plugin 'amdt/vim-niji'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'tpope/vim-fireplace'
Plugin 'guns/vim-clojure-static'
Plugin 'guns/vim-slamhound'
Plugin 'therubymug/vim-pyte.git'
Plugin 'rizzatti/funcoo.vim'
Plugin 'rizzatti/dash.vim'
Plugin 'nathanaelkane/vim-indent-guides.git'
Plugin 'endel/vim-github-colorscheme.git'
Plugin 'kien/rainbow_parentheses.vim'
Plugin 'scrooloose/syntastic.git'
Plugin 'bling/vim-airline'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'nanotech/jellybeans.vim'
Plugin 'w0ng/vim-hybrid.git'
Plugin 'chriskempson/tomorrow-theme', { 'rtp': 'vim/' }
Plugin 'chriskempson/base16-vim'
Plugin 'vim-scripts/paredit.vim'
Plugin 'skammer/vim-css-color'
Plugin 'carlobaldassi/ConqueTerm'
Plugin 'mxw/vim-jsx.git'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'wesgibbs/vim-irblack'
Plugin 'wakatime/vim-wakatime'
Plugin 'rking/ag.vim'
Plugin 'fwolanski/vim-clojure-conceal'
Plugin 'heavenshell/vim-jsdoc'
call vundle#end()
syntax enable
filetype on
filetype indent on
filetype plugin on
" some things are not compatible with the fish shell
set shell=/bin/bash
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 expandtab
set cursorline
set cursorcolumn
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'
" Doxygen stuff
let g:DoxygenToolkit_briefTag_pre="@brief "
let g:DoxygenToolkit_paramTag_pre="@param "
let g:DoxygenToolkit_returnTag="@returns "
let g:DoxygenToolkit_authorName="Uday Verma"
" show whitespaces
set listchars=tab:▸\ ,eol:¬
" set list
" Treat .opencl files like opencl files
au BufNewFile,BufRead *.opencl set ft=opencl
" Dash bindings stuffs
let g:dash_map = {
\ 'clojure' : 'Clojure',
\ 'cpp' : 'C++',
\ 'c' : 'C',
\ 'javascript' : 'nodejs'
\ }
nmap <silent> <leader>d <Plug>DashSearch
" indent guides stuff
let g:indent_guides_guide_size=1
" 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)$']
" Tell clojure conceal to hide extras
let g:clojure_conceal_extras = 1
" Make sure rainbow parenthesis are always active for extra festivities
"
au BufEnter * RainbowParenthesesActivate
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
set wildignore+=*/target/*,*/out/*,*/node_modules/*
function! s:SetPreferredFont()
set guifont=Consolas:h15
set antialias
endfunction
" 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
function! s:HackerMode()
set guifont=ProggyCleanTT:h16
set noantialias
endfunction
function! s:NoobMode()
call s:SetPreferredFont()
set antialias
endfunction
command! -bar DayTime call s:DayTime()
command! -bar NightTime call s:NightTime()
command! -bar HackerMode call s:HackerMode()
command! -bar NoobMode call s:NoobMode()
command! Piggie :Piggieback (cemerick.austin/exec-env)
command! Biggie :Piggieback (cemerick.austin/exec-env :exec-cmds ["open" "-ga" "/Applications/Google Chrome.app"])
command! Wiggie :Piggieback (weasel.repl.websocket/repl-env :ip "0.0.0.0" :port 9001)
if has("gui_running")
DayTime
call s:SetPreferredFont()
set go-=T
set go-=r
set go-=R
" in GUI mode, make sure that clojure files have a good amount of line
" spacing
au FileType clojure setl linespace=3
elseif &t_Co == 256
colorscheme Tomorrow-Night
set mouse=a
else
colorscheme desert
set mouse=a
endif
autocmd BufWritePre * :%s/\s\+$//e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment