radian icon indicating copy to clipboard operation
radian copied to clipboard

vi mode - normal and visualindicated the same way

Open raffaem opened this issue 5 months ago • 6 comments

With

options(radian.editing_mode = "vi")
options(radian.show_vi_mode_prompt = TRUE)
options(radian.vi_mode_prompt = "\033[0;34m[{}]\033[0m ")

while insert mode is indicated with "ins", both normal and visual mode are indicated in the same way, with "nav".

On a side note:

  1. When in visual mode, pressing ESC takes a lot of time to exit visual mode (1/2 seconds)
  2. Is it possible to indicate the mode with just one letter (i/n/v)?

EDIT: replace mode also has its own wording, "rep".

raffaem avatar Jan 19 '24 06:01 raffaem

both normal and visual mode are indicated in the same way, with "nav".

It is expected behavior as long as i can tell.

When in visual mode, pressing ESC takes a lot of time to exit visual mode (1/2 seconds)

it is a known issue of prompt-toolkit. ipython shares the same issues.

Is it possible to indicate the mode with just one letter (i/n/v)?

options(
    radian.vi_mode_prompt = list(
        "ins" = "(I) ",
        "nav" = "(N) ",
        "rep" = "(R) "
    )
)

randy3k avatar Jan 24 '24 04:01 randy3k

Is it possible to indicate the mode with just one letter (i/n/v)?

options(
    radian.vi_mode_prompt = list(
        "ins" = "(I) ",
        "nav" = "(N) ",
        "rep" = "(R) "
    )
)

Is this documented?

raffaem avatar Jan 24 '24 06:01 raffaem

uhm can I have per-mode cursors? I would like a box in normal mode, and a vertical bar in insert mode.

As you can see, I am very, very spoiled 😛

raffaem avatar Jan 24 '24 06:01 raffaem

When in visual mode, pressing ESC takes a lot of time to exit visual mode (1/2 seconds)

it is a known issue of prompt-toolkit. ipython shares the same issues.

is it ever going to be fixed?

I wrote a bug report and never received an answer

raffaem avatar Jan 24 '24 06:01 raffaem

Is this documented?

No. But it is not likely to be changed unless prompt-toolkit changes the input modes.

uhm can I have per-mode cursors? I would like a box in normal mode, and a vertical bar in insert mode.

prompt-toolkit added this support in https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1558

it should be doable, but I don't have the time to invest in it now.

randy3k avatar Jan 24 '24 07:01 randy3k

is it ever going to be fixed?

I wrote a bug report and never received an answer

I don't think it is fixable without major refactoring in prompt-toolkit's key capturing mechanism.

randy3k avatar Jan 24 '24 07:01 randy3k