Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vi mode - normal and visualindicated the same way #462

Open
raffaem opened this issue Jan 19, 2024 · 6 comments
Open

vi mode - normal and visualindicated the same way #462

raffaem opened this issue Jan 19, 2024 · 6 comments

Comments

@raffaem
Copy link

raffaem commented Jan 19, 2024

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".

@randy3k
Copy link
Owner

randy3k commented Jan 24, 2024

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) "
    )
)

@raffaem
Copy link
Author

raffaem commented Jan 24, 2024

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
Copy link
Author

raffaem commented Jan 24, 2024

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
Copy link
Author

raffaem commented Jan 24, 2024

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

@randy3k
Copy link
Owner

randy3k commented Jan 24, 2024

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 prompt-toolkit/python-prompt-toolkit#1558

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

@randy3k
Copy link
Owner

randy3k commented Jan 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants