Skip to content

Instantly share code, notes, and snippets.

@franTarkenton
Last active November 23, 2018 23:38
Show Gist options
  • Save franTarkenton/d5424e79bd9d84ed6e53d6f966f0fb55 to your computer and use it in GitHub Desktop.
Save franTarkenton/d5424e79bd9d84ed6e53d6f966f0fb55 to your computer and use it in GitHub Desktop.
Eclipse Tips

Drawing

Useful Shortcuts

      Short cut       description
ctrl->2, w wraps paragraphs the extend beyond the allowable character limit, super useful for formatting comments
ctrl->shift->F invokes auto format, removed unnecessary trailing and leading spaces
ctrl->F9 when executed on a pytest script allows you to select a specific test to run.
ctrl->1 spelling
ctrl->Shift->X Uppercase
ctrl->Shift->Y Lowercase
ctrl->Shift->0 Organize imports
ctrl->Shift->P Go to enclosing bracket

Generate Docstrings:

  • put line on the def statement
  • ctrl->1, select 'Make Docstring' *still requires you to enter in the return parameters, ie :return: def and :rtype: for the type

Configurations

  • General->Editors->Text Editors: check "Show print margin" and set "print margin column" to 75
  • General->Keys: do a search on 'collapse' then copy "Python Collapse All", for the copied version add Ctrl->9 as a shortcut. Allows working on keyboards without number pads
  • PyDev->pyUnit: Select py.test runner, set the following switches:
    • --verbosity 0
    • -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment