wmvanvliet/vim-ipython — pull request #2 by z0rch (2014-04-28 19:05:25+00:00)
Title: FoldByCell now can be enabled by a keystroke

Hey Marijn,

Another idea that I wanted to share with you.

Some of the work I'm doing with Python is **not** a part of IPython scripts, so actually most of the time I prefer my standard folding settings. However when I work on a IPython script, I do want the fold by cell feature.

It seems like currently I can only choose whether I want FoldByCell for **all** Python files or not, so I made this feature as a function, that can be called by a keystroke, like this:

nmap ipfc (IPython-EnableFoldByCell)

Now when I open a file and want to work in IPython environment, I intentionally press my keystroke to enable the cell folding.

It's pretty useful, give it a try!

P.S. I was also thinking of calling this function when ``:IPython`` is executed, but for now I decided not to mix the kernel initialization code and leave it as a separate keystroke, will see how it works for me.