Skip to content

Instantly share code, notes, and snippets.

@jacob-ogre
Created May 20, 2013 13:40
Show Gist options
  • Save jacob-ogre/5612289 to your computer and use it in GitHub Desktop.
Save jacob-ogre/5612289 to your computer and use it in GitHub Desktop.
My .vimrc, which captures most of the functionality of Sublime Text 2 while using all open-source software. One particularly important difference (for me) is that the use of tmux and vim-slime permits running a script in one pane and an REPL in a second pane, and sending lines/blocks of, e.g., R code from pane 0 to pane 1 (or whatever arrangemen…
color desert
filetype plugin on
syntax on
let mapleader = ","
let g:mapleader = ","
let g:slime_target = "tmux"
let python_highlight_all = 1
map <F12> :let &background = ( &background == "dark"? "light" : "dark" )<CR>
map <Leader>c :CMiniBufExplorer<cr>
map <Leader>u :UMiniBufExplorer<cr>
map <Leader>t :TMiniBufExplorer<cr>
" set basics
set nocompatible
set encoding=utf8
" numbers and columns
set number
set colorcolumn=80
set hidden
" fix tabs
set autoindent
set tabstop=4
set shiftwidth=4
set expandtab
" use smartcase in searches
set smartcase
" re-map some keys
nmap <C-c><C-n> <plug>SlimeLineSend
nmap <C-b> :!python %
" Vundle stuff:
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" Basics : git, dir browser, colors, and fuzzy-search
Bundle 'tpope/vim-fugitive'
Bundle 'scrooloose/nerdtree'
Bundle 'flazz/vim-colorschemes'
Bundle 'kien/ctrlp.vim'
" super-useful for sending lines/blocks to an REPL
Bundle 'jpalardy/vim-slime'
" Get some syntax-handling and omni-complete capabilities:
Bundle 'scrooloose/syntastic'
Bundle 'davidhalter/jedi-vim'
Bundle 'ervandew/supertab'
Bundle 'hdima/python-syntax'
" Use gists:
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
" Install dependencies and then snipmate:
Bundle 'MarcWeber/vim-addon-mw-utils'
Bundle 'tomtom/tlib_vim'
Bundle 'honza/vim-snippets'
Bundle 'garbas/vim-snipmate'
" Mini buffer explorer to view buffers kinda like tabs in ST2/other
Bundle 'fholgado/minibufexpl.vim'
" multiple cursors, like ST2 (I hope)
Bundle 'terryma/vim-multiple-cursors'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment