julienr / pycharm-cellmode

PyCharm cell mode
Other
25 stars 5 forks source link

Feature request - allow the cell divider line to have extra information #7

Closed maxborn closed 5 years ago

maxborn commented 5 years ago

Hi Guys, first, thanks for this plug in. It's what finally allowed me, and I guess many others, to use PyCharm-Community for scientific computing, instead of Spyder. PyCharm is superior in many ways. The plugin is even better than the native cell mode support that PyCharm-pro has in scientific-mode, because there is no run-cell without advancing to the next in PyCharm Scientific Mode. I have one small request, though, and I'l greatly appreciate if you could kindly add it to the plug in. I would like to add extra information, like a cell title, to the cell divider (header), so it's easy to collapse them but still see the title. The problem as of now, is, that no matter what regular expression I use in the plug-in configuration, the moment I add something after the ## or #%%, the line is not recognized as a cell divider anymore. Example: I would like to use #%% #This is the first cell or something similar. Or even better, if this is implemented, it would be possible to combine an editor-fold region with a cell divider like this:

editor fold region

Then a long script can be folded into single line cell titles, and cells executed easily. Thanks for considering this, Best regards, M.

maxborn commented 5 years ago

Actually, sorry, there is no need for this. After looking into regular expressions for a little longer, I found a way to match the whole line with ^\s#\s%%.* This produces a match for any line that starts with #%% no matter what comes afterwards. So now my .py files wrote originally in Spyder, work in Pycharm without any modifications. Thanks again. M.

julienr commented 5 years ago

Happy that you find the plugin useful. Thanks !