[ESS] How to move to start of previous command, but not start of line?
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Sat Aug 28 04:25:51 CEST 2021
On 27 August 2021 at 20:48, William Denton via ESS-help wrote:
| Let's say I enter the following keystrokes:
|
| 1 + 1 RET M-p C-a
|
| This adds 1+1, gets the result, then runs comint-previous-input and reenters the
| previous command. C-a moves to the start of the line ... but puts the point
| before the prompt, where the | is below.
|
| # ———
| > 1+1
| [1] 2
| |> 1 + 1
| # ———
|
| Is there a way to go to the start of the command, not the line? I'm often in a
| situation where I get something working and then want to assign it to a
| variable, and it would be nice to run M-p C-a and be able to type "foo <-" with
| everything in place. (Thereby saving me all the trouble of hitting the right
| arrow twice, which I know is trivial, but this is Emacs so I bet someeone has
| got this working, unless I missed it in the docs.)
When I do
foo <- 1 + 1 RET M-p C-a
my cursor is on f.
And always has been. Vanilla Emacs, currently 27.1, though I started using it
just before the 20s if memory serves, vanilla ESS most of those years, and no
fanyc prompt inside R. Just a a standar '> ' as
> getOption("prompt")
[1] "> "
>
Dirk
--
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the ESS-help
mailing list