Closed sverrirarnors closed 5 months ago
In radian, by contrast, the only character that the Alt + Backspace combo stops on is space. In the example above, I would end up with
)
after performing the same action.
On my macOS with iTerm2, radian and R have the same behavior, the word argument
is removed. We used prompt-toolkit
. A quick check confirms that it is the intended behavior. ref: https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/src/prompt_toolkit/key_binding/bindings/emacs.py#L75
You are totally correct. I was comparing radian in VS Code and R in iTerm2. It seems to be a VS Code-specific issue; see this Stackoverflow thread.
When Alt+Backspace is pressed in the regular R terminal (at least on Mac), it deletes a whole word. The word boundary is defined by a couple of characters, for example, space, comma, period, equal sign, and every type of bracket.
For example, if I write a function call with arguments
function(argument)
. If I have the cursor after thet
inargument
and press Alt + Backspace, the regular R terminal deletes everything up to the bracket, with the result beingfunction()
.In radian, by contrast, the only character that the Alt + Backspace combo stops on is space. In the example above, I would end up with
)
after performing the same action.