Skip to content

Instantly share code, notes, and snippets.

@akofink
Created June 25, 2015 21:50
Show Gist options
  • Select an option

  • Save akofink/fa272ec32593040c4e5d to your computer and use it in GitHub Desktop.

Select an option

Save akofink/fa272ec32593040c4e5d to your computer and use it in GitHub Desktop.
" System
set shell=/bin/bash
set clipboard=unnamed
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Github Bundles
Plugin 'airblade/vim-gitgutter'
Plugin 'vim-scripts/c.vim'
Plugin 'm2ym/rsense'
Plugin 'Raimondi/delimitMate'
Plugin 'Shougo/neocomplcache'
Plugin 'bling/vim-airline'
Plugin 'danro/rename.vim'
Plugin 'docunext/closetag.vim'
Plugin 'elixir-lang/vim-elixir'
Plugin 'flazz/vim-colorschemes'
Plugin 'gmarik/Vundle.vim'
Plugin 'jcf/vim-latex'
Plugin 'kana/vim-fakeclip'
Plugin 'kchmck/vim-coffee-script'
Plugin 'kien/ctrlp.vim'
Plugin 'majutsushi/tagbar'
Plugin 'mattn/gist-vim'
Plugin 'mattn/webapi-vim'
Plugin 'mileszs/ack.vim'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'othree/html5.vim'
Plugin 'rking/ag.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'sjl/gundo.vim'
Plugin 'tpope/vim-abolish'
Plugin 'tpope/vim-commentary'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-haml'
Plugin 'tpope/vim-markdown'
Plugin 'tpope/vim-rails.git'
Plugin 'tpope/vim-rbenv'
Plugin 'tpope/vim-surround'
Plugin 'vim-ruby/vim-ruby'
Plugin 'vim-scripts/loremipsum'
Plugin 'vim-scripts/supertab'
Plugin 'vim-scripts/vimwiki'
" Indent Guides
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_start_level=2
let g:indent_guides_guide_size=1
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
" Spell check
set spell
" Global undo
silent !mkdir -p ~/.vim/undo > /dev/null 2>&1
set undofile
set undodir=~/.vim/undo
" Global Swap Dir
silent !mkdir -p ~/.vim/backups > /dev/null 2>&1
set backupdir=~/.vim/backups
" All of your Plugins must be added before the following line
call vundle#end()
filetype plugin on
" CtrlP Setup
set runtimepath^=~/.vim/bundle/ctrlp.vim
" Gist setup
let g:github_token = $GITHUB_TOKEN
let g:gist_open_browser_after_post = 1
" Syntax Highlighting
set t_Co=256
syntax enable
syntax on
set background=light
colorscheme solarized
filetype plugin indent on
let g:syntastic_ruby_exec = '~/.rbenv/shims/ruby'
" Spacing and Wrapping
set expandtab
set softtabstop=2
set shiftwidth=2
set tabstop=2
set textwidth=80
" Interface
set showcmd
" Status bar
hi StatusLine ctermbg=white ctermfg=blue
hi StatusLine ctermbg=white ctermfg=blue
set statusline=[%n]\ %<%.99f\ %h%w%m%r%{exists('*CapsLockStatusline')?CapsLockStatusline():''}%y%=%-16(\ %l,%c-%v\ %)%P
" Editing
set smartindent
set showmode
set showmatch
set list listchars=tab:>>,eol:¬,trail:·
set rnu
set number
set backspace=indent,eol,start
" Multipurpose Tab Key
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
inoremap <s-tab> <c-n>
" Searching
set incsearch
set hlsearch
set ignorecase smartcase
" File Storage
set autoread
set noswapfile
set nobackup
set nowritebackup
" NERDTree
let NERDTreeShowHidden=1
" Ctrl-P
let g:ctrlp_show_hidden = 1
" Vim-latex
let g:Tex_UseMakefile = 0
" Leader
let mapleader = ' '
map <leader>n :NERDTreeToggle<CR>
map <leader>b :CtrlPBuffer<CR>
" move around with the arrow keys
noremap <silent> <Right> <c-w>l
noremap <silent> <Left> <c-w>h
noremap <silent> <Up> <c-w>k
noremap <silent> <Down> <c-w>j
" Editing macros
map <leader>wsx :%s/\v +$//g<CR>
" Command
map <leader><leader> :
" CtrlP
map <leader>f :CtrlP<CR>
" Quit
map <leader>q :q<CR>
" Config
map <leader>c :e ~/.vimrc<CR>
" Reload Config
map <leader>R :so ~/.vimrc<CR>
" Relative Line Numbers
map <leader>lr :set rnu<CR>
" Fixed Line Numbers
map <leader>ln :set number<CR>
" Reload Tags
map <leader>T :!/usr/local/bin/ctags -R --exclude=.git --exclude=log *<CR><CR>
" Run
map <leader>r :!./%<CR>
" Run Rspec
map <leader>t :!rspec spec<CR>
" Lorem Ipsum
map <leader>li :Loremipsum<CR>
" Rails Bundle
map <leader>rbi :!bundle<CR>
" VIM Bundle
map <leader>bi :BundleInstall<CR>q
" Update dots
map <leader>dots :!cd ~/dots && ./test_update<CR><CR>
" VIM wiki
map <leader>wdiary :VimwikiDiaryIndex<CR>:VimwikiDiaryGenerateLinks<CR>
map <leader>wb :VimwikiAll2HTML<CR><CR>:Vimwiki2HTMLBrowse<CR><CR>
map <leader>wB :VimwikiBacklinks<CR><CR>:VimwikiAll2HTML<CR><CR>:Vimwiki2HTMLBrowse<CR><CR>
map <leader>< :foldclose<CR>
map <leader>> :foldopen<CR>
map <leader>m :!make<CR>
map <leader>s :set spell!<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment