Skip to content

Latest commit

 

History

History
260 lines (164 loc) · 9.2 KB

ui.adoc

File metadata and controls

260 lines (164 loc) · 9.2 KB

Morse UI

The Morse User Interface

Morse is a graphical, interactive tool for browsing or inspecting Clojure data.

Morse UI

More about Morse

Code Editor

The Code Editor is a full-featured editor for writing clojure code. Code is evaluated and the results are immediately available inside the browser, out and tap tabs.

Numerous hotkeys are available for text editing.

Browser

Results of evaluation appear in the Browser pane. When navigating using the forward and back buttons, the current values will appear in the appropriate browser in this pane.

nav→ will navigate deeper into data while keeping the current browser view on the data that you’re acting upon.

Evaluating new code or navigating back to the root will cause the Browser Pane to return to the evaluation-history.

Browser Viewer

Data in the browser can be displayed in a variety of ways. The Browser View drop-down lists the current available views for the data displayed in the Browser.

Data Viewer

The data currently selected in the Browser will be displayed in the Data Viewer using the currently selected viewer.

Data Viewer Type

A number of viewers are available for different shapes and types of data.

def as

Typing a valid clojure symbol name into the def as: text box and pressing enter will def bind the data shown in the Data Viewer to that var in the user namespace.

Vars are def’d in the user name space of the evaluating process.

This is often useful when navigating deep into data and you want to extract the data in the Data Viewer.

Metadata Viewer

The Metadata Viewer displays the Metadata for the data currently displayed in the Data Viewer

Nav Forward

The forward button (Command-Right) navs into the data selected in the Data Viewer and the current value is moved to the Browser.

If nav→ is currently being used, then it will be added to the path when navigating forward.

Nav Back

The back button (Command-Left) navs to the previous value in the navigation history.

If nav→ was used while navigating forward, then the full nav→ path that was used will be treated as a single nav step while navigating back.

Back to eval-history

This button (Shift-Command-Left) will navigate back to the evaluation history.

Follow REPL

If launching Morse in-process, Morse will follow all REPL interactions. The Follow REPL checkbox controls whether this is active or not. This option is not available when Morse is used as a remote inspector.

out

The out tab shows out for the Morse repl.

tap

Morse adds a tap and calls to tap will be displayed here.

The resulting values from Morse’s tap can be cleared, or loaded into the Data View with the browse button.

path

path: displays the currently navigated path starting with the index in the eval-history.

nav→

nav→ allows you to supply a set of keys or a set of parenthesized forms to navigate forward in the currently selected collection without changing the relationship between the Current Browser and Data Viewer panes.

The Data Viewer will nav→ to the data, but the Browser will remain unchanged.

nav→ remains in effect while browsing the eval-history, so if you have a number of results which require the same navigational steps, this can be entered into nav→ and all browsing will utilize those steps.

Datafied Filetypes

When running in remote inspection mode, Morse will have only the evaluation context’s datafy definitions available to it. Therefore, Morse allows you to load a colocated file of datafy declarations into the remote process by evaluating the following in the code editor:

(nubank.morse/load-file "local-path-to-datafy-code-file")

The load-file feature will evaluate each datafy form in the remote evaluation context. Subsequent data view items will render as defined by the loaded datafy declarations.

However, when run in-process Morse will automatically datafy java.io.Files that contain data to return the contents of those files, as described below:

Extension Format Library Required (Tested With)

.csv

csv

data.csv 0.1.4

.edn

edn

(none)

.properties

Java properties

.json

json

data.json 0.2.3

.yml, .yaml

YAML

snakeyaml 1.23

Browsable Files

Morse will open a WebView on java.io.Files whose name returns a text/ or image/ mimetype from the configured Java FileNameMap.

Current Keybindings

Editor Keys

Command Key Command Key

Add Cursor Above

Option-Command-Up

Expand Select

Control-Shift-Command-Right

Add Cursor Below

Option-Command-Down

Find

Command-F

Add Cursors to Line Ends

Shift-Option-L

Find Next

Command-G

Add Line Comment

Command-K Command-c

Find Next Selection

Command-F3

Add To Next Find Match

Command-D

Find Previous

Shift-Command-G

Backspace

Backspace

Find Previous Selection

Shift-Command-F3

Backward sexp

Option-Left

Find With Selection

Command-E

Backward sexp mark

Shift-Option-Left

Fold

Option-Command-[

Backward Up sexp

Option-Up

Fold All

Command-K Command-0

Barf sexp Backward

Control-Option-Right

Fold All Block Comments

Command-K Command-/

Barf sexp Forward

Control-Left

Fold All Regions

Command-K Command-8

Change All Occurrences

Command-F2

Fold Level 1

Command-K Command-1

Copy

Command-C

Fold Level 2

Command-K Command-2

Copy Line Down

Shift-Option-Down

Fold Level 3

Command-K Command-3

Copy Line Up

Shift-Option-Up

Fold Level 4

Command-K Command-4

Cut

Command-X

Fold Level 5

Command-K Command-5

Delete

Delete

Fold Level 6

Command-K Command-6

Delete All Left

Command-Backspace

Fold Level 7

Command-K Command-7

Delete All Right

Control-K

Fold Recursively

Command-K Command-[

Delete Line

Shift-Command-K

Format Document

Shift-Option-F

Evaluate Code

Control-Enter

Format Selection

Command-K Command-F

Command Key Command Key

paredit-open-round

(

paredit-forward-slurp-sexp

Control-Right

paredit-open-square

[

paredit-backward-slurp-sexp

Control-Option-Left

paredit-open-curly

\{

backward-sexp-mark

Option-Shift-Left

paredit-forward

Option-Right

forward-sexp-mark

Option-Shift-Right

paredit-backward

Option-Left

paredit-split-sexp

Option-Shift-S

paredit-backward-up

Option-Up

paredit-splice-sexp

Option-S

paredit-forward-down

Option-Down

paredit-kill

Control-K

paredit-reindent-defun

Option-Q

paredit-kill-backward

Control-Shift-K

paredit-forward-barf-sexp

Control-Left

paredit-delete

Delete

paredit-backward-barf-sexp

Control-Option-Right

paredit-backspace

Backspace

App Keys

Command Key

Nav Forward

Command-Right

Nav Backwards

Command-Left

Nav to Root (Eval History)

Shift-Command-Left

Focus Browse

Control-B

Focus View

Control-V

Focus Browse Choice

Shift-Control-B

Focus View Choice

Shift-Control-V

Focus Code Entry

Control-R