Skip to content

Instantly share code, notes, and snippets.

@sbchisholm
Last active December 14, 2015 01:29
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 sbchisholm/5006215 to your computer and use it in GitHub Desktop.
Save sbchisholm/5006215 to your computer and use it in GitHub Desktop.
vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/Vundle.vim'
" Python Bundles
Bundle 'klen/python-mode'
Bundle 'davidhalter/jedi-vim'
" Other plugins
Bundle 'editorconfig/editorconfig-vim'
Bundle 'scrooloose/nerdtree'
Plugin 'JuliaLang/julia-vim'
" Powerline fonts https://github.com/Lokaltog/powerline-fonts
Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
" Git Plugin
Bundle 'tpope/vim-fugitive'
" The bundles you install will be listed here
filetype plugin indent on
" The rest of your config follows here
augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%80v.*/
autocmd FileType python set nowrap
augroup END
" Mouse Configuration
set mouse=a
set ttymouse=sgr
" Powerline setup
"set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 9
"let g:Powerline_symbols='fancy'
set laststatus=2
" Colours
set background=dark
" https://github.com/tomasr/molokai
colorscheme molokai
set hlsearch
set number
highlight ColorColumn ctermbg=235 guibg=#2c2d27
" Keyboard Mappings
map <F2> :NERDTreeToggle<CR>
" Python-mode
" Activate rope
" Keys:
" K Show python docs
" <Ctrl-Space> Rope autocomplete
" <Ctrl-c>g Rope goto definition
" <Ctrl-c>d Rope show documentation
" <Ctrl-c>f Rope find occurrences
" <Leader>b Set, unset breakpoint (g:pymode_breakpoint enabled)
" [[ Jump on previous class or function (normal, visual, operator modes)
" ]] Jump on next class or function (normal, visual, operator modes)
" [M Jump on previous class or method (normal, visual, operator modes)
" ]M Jump on next class or method (normal, visual, operator modes)
let g:pymode_rope = 0
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
"Linting
let g:pymode_lint = 1
let g:pymode_lint_checker = "pyflakes,pep8"
" Auto check on save
let g:pymode_lint_write = 1
" Support virtualenv
let g:pymode_virtualenv = 1
" Enable breakpoints plugin
let g:pymode_breakpoint = 1
let g:pymode_breakpoint_key = '<leader>b'
" syntax highlighting
let g:pymode_syntax = 1
let g:pymode_syntax_all = 1
let g:pymode_syntax_indent_errors = g:pymode_syntax_all
let g:pymode_syntax_space_errors = g:pymode_syntax_all
" Don't autofold code
let g:pymode_folding = 0
" Use <leader>l to toggle display of whitespace
nmap <leader>l :set list!<CR>
" automatically change window's cwd to file's dir
"set autochdir
" I'm prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
" more subtle popup colors
if has ('gui_running')
highlight Pmenu guibg=#cccccc gui=bold
endif
" Make setup
set makeprg=make\ -k\ -j8
" Code Search
:command -nargs=* Grep grep -srn --color=NEVER --binary-files=without-match --exclude-dir=.git --exclude-from=$HOME/.vim/exclude.list <args> $CODE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment