1

Is there a way to comment out entire blocks of code in FME with a keyboard shortcut?

All keyboard shortcuts I could find were not related to scripting windows (like the PythonCaller-transformer) in FME.

3
  • 1
    What sort of scripts are you trying to edit in FME? Presumably, you're not looking to add comments to the FMW file itself? Are you talking about the workspace canvas or one of the text editor dialogs? Sep 28, 2022 at 15:32
  • I'm talking about the text edit dialogues from the Python transformers, and the Python startup and shutdown scripting dialogues
    – saQuist
    Sep 28, 2022 at 16:09
  • via PyCharm? [Ctrl+Shift+/ ] community.safe.com/s/article/…
    – Mapperz
    Sep 29, 2022 at 2:20

1 Answer 1

2

No, this is not possible yet. There are two workarounds:

  1. Copy code from FME to IDE, which can do block comments (such as PyCharm, Visual Studio Code, Notepad ++, Spyder, etc.), do block comment via keyboard shortcut in that IDE and copy code back to FME.
  2. Manually comment out each line of code in FME by putting # before.

To make commenting of a block of code in FME easier in the future, vote for this idea: https://community.safe.com/s/bridea/a0r4Q00000JCAcdQAH/comment-out-block-of-code-in-fme-via-keyboard-shortcut

1
  • 1
    Thanks for posting. I just heard back from our developer at Safe who said the same about using an external IDE. He also suggested using the triple quotes idea, but I did read that can cause problems (Python in general, not just FME) so use that one with caution. Sep 29, 2022 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.