Skip to content

Instantly share code, notes, and snippets.

@philippeback
Forked from peteruhnak/Nautilus Shortcuts.md
Created April 11, 2017 15:49
Show Gist options
  • Save philippeback/e40c5ce8cb5a750fcc8f620660081d59 to your computer and use it in GitHub Desktop.
Save philippeback/e40c5ce8cb5a750fcc8f620660081d59 to your computer and use it in GitHub Desktop.
Pharo Nautilus Shortcuts Cheatsheet

Nautilus Shortcuts Cheatsheet

All shortcut keys are with the Meta key, e.g. F P = Meta+F Meta+P.

Meta key depends on your platform (Ctrl for Linux, Alt for Windows).

Running shortcuts from code editor

Unfortunately when you are in the source code editor, the editor will consume most of the shortcuts which is annoying as **** (some, such as running tests seems to always work though).

You can "fix" this by clicking on a class/method/protocol pane (to remove the focus from the code editor), or press Meta+Tab six times to switch focus to the package pane. This makes use of the shortcuts much more annoying, but still worth it in most of the cases.

If you know a better way to move the focus, please let me know.

Basic shortcuts

Package Class Protocol Method Hierarchy Test Class Superclass Subclass
Find F P F C F T F M F H - F Shift+S F S
Go (Jump) G P G C G T G M - G J C - -
Create New N P N C N T - - N J C - -
Rename R P R C R T R M - - - -
Remove X P X C X T X M - - - -
Test¹ J P J C - J M - - - -
Categorize² - M C - M M - - - -
  • ¹ Run tests in the selected Package, Class, Method.
  • ² Set package for class, set protocol for method.

Open New Nautilus Window

  • Browse Full - Same as the current: B F
  • Browse Scoped: B S
    • If you have focus on package, then scoped on the package
    • If focus on class or one of its methods, then scoped on the class
  • Browse Restricted Class: B R C
    • You need to have a focus on either the class, or one of its protocols or methods
  • Browse Restricted Package: B R P
    • Should work anywhere
  • Browse Restricted Subclasses: B R S
    • Scoped on the chosen class and all its subclasses in the current package
  • Browse Restricted Superclasses: B R Shift+S
    • Scoped on the chosen class and all its superclasses in the current package
  • Browse Restricted Regex: B R R
    • Scope selected packages by regex
  • Browse Variables: B V
    • Show popup with the class' variables
  • Browse Bytecode: B B
    • Switch the code editor to bytecode view
  • Browse Implementors: B M
  • Browse Senders: B N
  • Browse class references: B Shift+N

Generating

For new class/package/... see the table.

  • Accessors: H A
    • Generate missing accessors for all variables, you will be given popup where you can choose which methods you want
    • Generate
  • Initialize: H I
    • In regular class add initialize methods with instance variables set to nil
    • If initialize exists, open it
    • For TestCase subclasses, it will instead generate setUp and tearDown methods with instance variables set to nil
  • Regenerate initialize: H K
    • Same as above, but will recreate the method if it already exists
    • For TestCase same as above.
  • Create a subclass: H N S
  • Create test method and jump to it: H J
    • Creates a test method for the currently selected method and jump to it
  • Create test method without jumping: H Shift+J

Navigating

  • Class side view: T C
  • Instance side view: T I
  • Hierarchy view: T H
  • Flat view: T F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment