'''...after prototyping in the notebook, I usually refactor some of my code into individual Python files so that I can edit more comfortably using my preferred text editor. I then import those modules [back] in the...notebook.'''
I found this to be quite a headache myself, going between the iPython notebook and vim, until I discovered this great Firefox addon called "It's all text" [not affiliated] -- for those unaware, it lets you pop open a gui editor of your choice, whereupon you can send the text entered from that back down into the iPython notebook. Doing it this way you get the best of both worlds.