Skip to content

Instantly share code, notes, and snippets.

@lucasefe
Created March 13, 2015 03:54
Show Gist options
  • Save lucasefe/b34ddad864bfd188134d to your computer and use it in GitHub Desktop.
Save lucasefe/b34ddad864bfd188134d to your computer and use it in GitHub Desktop.
set background=dark
colorscheme desert256
let mapleader=","
map <Leader>s :!chibi-scheme %<CR>
map <Leader>r :!ruby %<CR>
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/vundle'
Plugin 'pangloss/vim-javascript'
Plugin 'avakhov/vim-yaml'
Plugin 'chriskempson/base16-vim'
Plugin 'd11wtq/ctrlp_bdelete.vim'
Plugin 'danchoi/ri.vim'
Plugin 'duggiefresh/vim-easydir'
Plugin 'ervandew/supertab'
Plugin 'godlygeek/tabular'
Plugin 'gregsexton/gitv'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'kien/ctrlp.vim'
Plugin 'mattn/gist-vim'
Plugin 'scrooloose/syntastic'
Plugin 'szw/vim-tags'
Plugin 'tacahiroy/ctrlp-funky'
Plugin 'tpope/vim-haml'
Plugin 'vim-ruby/vim-ruby'
Plugin 'airblade/vim-gitgutter'
Plugin 'bling/vim-airline'
Plugin 'tpope/vim-fugitive'
Plugin 'mattn/webapi-vim'
call vundle#end()
" Basic defaults
syntax on
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
set nocompatible " We're running Vim, not Vi!
set expandtab " No tabs, but spaces when tabbing
set tabstop=2
set shiftwidth=2
set softtabstop=2
set autoindent
set number
set nobackup
set nowritebackup
set noswapfile
set wrap
set splitbelow
set splitright
set hlsearch
set noautochdir
if $TMUX == ''
set clipboard+=unnamed
endif
" Support for 256 on VIM
set t_Co=256
nnoremap <S-h> :tabprev<CR>
nnoremap <S-l> :tabnext<CR>
" SPLIT PANES
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
hi def link CtrlPMatch CursorLine
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git\|node_modules\|bin\|\.hg\|\.svn\|build\|log\|resources\|coverage\|doc\|tmp\|public/assets\|vendor\|Android',
\ 'file': '\.jpg$\|\.exe$\|\.so$\|tags$\|\.dll$'
\ }
let g:ctrlp_open_new_file = 'r'
let g:ctrlp_switch_buffer = 'Et'
let g:ctrlp_extensions = ['funky']
let g:ctrlp_funky_multi_buffers = 1
let g:ctrlp_max_height = 20
nnoremap <C-b> :CtrlPBuffer<cr>
" CtrlP Delete
call ctrlp_bdelete#init()
" CtrlP Funky
autocmd Filetype html,xml,xsl source ~/.vim/scripts/closetag.vim
autocmd Filetype gitcommit setlocal spell textwidth=92
augroup reload_vimrc " {
autocmd BufWritePost $MYVIMRC source $MYVIMRC
augroup END " }
" No spaces at the end of the line, please.
autocmd BufWritePre *.rb :%s/\s\+$//e
" no EX mode, ever
nnoremap Q <nop>
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:tmuxline_preset = 'tmux'
" Invisible chars
set listchars=tab:▸\ ,trail:·,eol:¬,nbsp:_,extends:❯,precedes:
" Syntax coloring lines that are too long just slows down the world
set synmaxcol=1200
" Use only 1 space after "." when joining lines instead of 2
set nojoinspaces
" Don't reset cursor to start of line when moving around
set nostartofline
" Improve vim's scrolling speed
set ttyfast
set ttyscroll=3
set lazyredraw
set undofile " Save undo's after file closes
set undodir=~/.vim/undo " where to save undo histories
set undolevels=1000 " How many undos
set undoreload=10000 " number of lines to save for undo
if exists(":Tabularize")
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:\zs<CR>
vmap <Leader>a: :Tabularize /:\zs<CR>
nmap <Leader>a> :Tabularize /=>\zs<CR>
vmap <Leader>a> :Tabularize /=>\zs<CR>
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment