Skip to content

Instantly share code, notes, and snippets.

@leewardbound
Created May 30, 2011 15:43
Show Gist options
  • Save leewardbound/999069 to your computer and use it in GitHub Desktop.
Save leewardbound/999069 to your computer and use it in GitHub Desktop.
# In .vimrc
" ipython integration
autocmd FileType python map <F5> :w<CR>:!screen -x ipython -X stuff $'\%reset\ny\n\%cd %:p:h\n\%run %:t\n'<CR><CR>
# In .bashrc
function vips() {
# A named screen session attached to ipython
# so it can be sent commands (from vim)
screen -D -R -S ipython ipython
}
# In one window, run a vim ipython shell
$ vips
# You can now use <F5> in vim to run the current file in ipython
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment