Skip to content

Instantly share code, notes, and snippets.

@sh2
Last active December 19, 2015 03:59
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 sh2/5893958 to your computer and use it in GitHub Desktop.
Save sh2/5893958 to your computer and use it in GitHub Desktop.
Config file for Vim to use Python
set nocompatible
set t_Co=256
colorscheme default
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
"let g:neobundle#types#git#default_protocol='https'
NeoBundle 'davidhalter/jedi-vim'
NeoBundle 'kevinw/pyflakes-vim'
NeoBundle 'nathanaelkane/vim-indent-guides'
autocmd FileType perl,python setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4
autocmd FileType python IndentGuidesEnable
let g:jedi#popup_select_first = 0
let g:indent_guides_guide_size = 1
function! ExecScript() range
let src = tempname()
let dst = tempname()
execute ":" . a:firstline . "," . a:lastline . "w " . src
execute ":silent !" . &filetype . " " . src . " >" . dst . " 2>&1"
execute ":pedit! " . dst
endfunction
vmap <silent> <F5> :call ExecScript()<CR>
nmap <silent> <F5> mzggVG<F5>`z
imap <silent> <F5> <Esc><F5>a
filetype plugin indent on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment