Is there an equivalent of M-x forward-paragraph/backward-paragraph in PyCharm? Follow
I can't find the equivalent of Emacs' M-x forward-paragraph and backward-paragraph in PyCharm. I thought it would be "Move caret until code block (end|start)" but I don't think that does what I think it does. Can someone elaborate on this functionality and if the only way to do this right now is to write my own plugin?
Mahmoud
Please sign in to leave a comment.
Hello Mahmoud,
It will be easier for us to answer the question if you explain what exactly
forward-paragraph does in Emac.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dmitry,
From Gnu Emacs, the
forward-paragraph
function moves caret forward to the end of the paragraph and the backward-paragraph function moves caret back to previous paragraph's beginning.In this case, the word paragraph here means (from Emacs):
In major modes for programs, paragraphs begin and end only at blank lines. This makes the paragraph commands useful, even though there are no paragraphs as such in a program.
Hello Mahmoud,
At the moment there are no such navigation shortcuts in PyCharm. They can
be added by a plugin, but the plugin needs to be written in Java.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks Dmitry.
Any resources on where to get started on building a plugin? Maybe even an open source plugin I can take a look at?
Mahmoud
Hello Mahmoud,
The starting point for plugin development documentation is:
http://confluence.jetbrains.net/display/IDEADEV/PluginDevelopment
PyCharm is based on the IntelliJ Platform, so the infrormation applies to
PyCharm as well as IntelliJ IDEA.
You can also download the source code of IntelliJ IDEA Community Edition
(http://www.jetbrains.org/) and look at the code implementing other editor
actions as an example for implementing your own. The EditorActionUtil class
should be of the most relevance for this task.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"