From 8c9bdfb25fd9dbace682ab545e85683c9f47296f Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Tue, 13 Jan 2015 14:23:57 -0200 Subject: [PATCH] Add evaluation of code in CONVENTIONS --- doc/CONVENTIONS.md | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/doc/CONVENTIONS.md b/doc/CONVENTIONS.md index a2033bd63..4bfa4f8b6 100644 --- a/doc/CONVENTIONS.md +++ b/doc/CONVENTIONS.md @@ -11,6 +11,7 @@ - [Prefix reserved to the user](#prefix-reserved-to-the-user) - [Prefix reserved to the current major mode](#prefix-reserved-to-the-current-major-mode) - [Navigation between items](#navigation-between-items) + - [In buffer evaluation of code](#in-buffer-evaluation-of-code) - [Interactions with REPLs](#interactions-with-repls) - [Interactions with Tests](#interactions-with-tests) - [For all languages](#for-all-languages) @@ -65,29 +66,43 @@ A micro-state allows to repeat key bindings without entering each time the prefix commands. More info on micro-states in the [documentation](DOCUMENTATION.md#micro-states). +### In buffer evaluation of code + +Live evaluation of code is under the prefix ` e`. + + Key | Description +------------------|------------------------------------------------------------ +e $ | put the point at the end of the line and evaluate +e b | evaluate buffer +e e | evaluate last expression +e f | evaluate function +e l | evaluate line +e r | evaluate region + + ### Interactions with REPLs A lot of languages can interact with a REPL. To help keeping a consistent behavior between those languages the following conventions should be followed: -- ` m` is the prefix for sending code if there is any conflict with -other bindings then ` m s` is the prefered prefix. This allows fast -interaction with the REPL whenever it is possible. +- ` m s` is the prefix for sending code. This allows fast +interaction with the REPL whenever it is possible (don't forget that `,` is +a shortcut for ` m`). - lower case key bindings keep the focus on the current buffer - upper case key bindings move the focus to the REPL buffer - Key | Description ---------------------|------------------------------------------------------------ -m (s) b | send buffer -m (s) B | send buffer and switch to REPL -m (s) d | first key to send buffer and switch to REPL to debug (step) -m (s) D | second key to send buffer and switch to REPL to debug (step) -m (s) f | send function -m (s) F | send function and switch to REPL -m (s) l | send line -m (s) L | send line and switch to REPL -m (s) r | send region -m (s) R | send region and switch to REPL + Key | Description +------------------|------------------------------------------------------------ +m s b | send buffer +m s B | send buffer and switch to REPL +m s d | first key to send buffer and switch to REPL to debug (step) +m s D | second key to send buffer and switch to REPL to debug (step) +m s f | send function +m s F | send function and switch to REPL +m s l | send line +m s L | send line and switch to REPL +m s r | send region +m s R | send region and switch to REPL Note: we don't distinguish between the file and the buffer.