All polymode keys start with the prefix defined by polymode-prefix-key
(defaults to M-n). The polymode-mode-map
is the parent of all
polymodes' maps.
Navigation
All polymode navigation commands are "cycling commands" in the sense that they
can be invoked repeatedly with the press of the basic keys. For example, if the
polymode-minor-mode-map
is bound to the default M-n prefix, then
the sequence M-n C-n C-n C-p will invoke polymode-next-chunk
twice
and polymode-previous-chunk
once.
Shortcut |
Description |
C-n |
Move to next chunk (polymode-next-chunk ) |
C-p |
Move to previous chunk (polymode-previous-chunk ) |
C-M-n |
Move to next chunk of the same type (polymode-next-chunk-same-type ) |
C-M-p |
Move to previous chunk of the same type (polymode-previous-chunk-same-type ) |
Chunk Manipulation
Shortcut |
Description |
M-k |
Kill current chunk (polymode-kill-chunk ) |
C-t |
Toggle narrowing of the body of current chunk (polymode-toggle-chunk-narrowing ) |
M-m |
DWIM repeatedly mark or extend region (polymode-mark-or-extend-chunk , a "cycling" command) |
Exporting, Weaving and Tangling
Shortcut |
Description |
e |
Export the document with the current exporter. (polymode-export ) |
E |
Ask and set the current exporter. (polymode-set-exporter ) |
w |
Weave the document with the current weaver. (polymode-weave ) |
W |
Ask and set the current weaver. (polymode-set-weaver ) |
t |
;; not implemented yet (polymode-tangle ) |
T |
;; not implemented yet (polymode-set-tangler ) |
$ |
Show the process buffer if something went wrong during the processing. (polymode-show-process-buffer ) |
Evaluation of Chunks
Many Emacs modes provide interactive evaluation of code. The output of the
evaluation is commonly directed into an inferior process buffer or directly into
the source buffer (e.g. org-mode
). Polymode provides a few generic commands in
polymode-eval-map
(M-n v by default) in order to facilitate
evaluation of code in polymode buffers.
Shortcut |
Description |
v |
Eval all inner chunks in a region if region is active or the current chunk at point (polymode-eval-region-or-chunk ) |
b |
Eval all inner chunks in a buffer (polymode-eval-buffer ) |
u or ↑ |
Eval from beginning of buffer till point (polymode-eval-buffer-from-beg-to-point ) |
d or ↓ |
Eval from point till end of buffer (polymode-eval-buffer-from-point-to-end ) |