Skip to content

Add mode-dependent vim cursor to radian/session.py - #222

Open
mskar wants to merge 1 commit into
randy3k:masterfrom
mskar:cursor
Open

Add mode-dependent vim cursor to radian/session.py#222
mskar wants to merge 1 commit into
randy3k:masterfrom
mskar:cursor

Conversation

@mskar

@mskar mskar commented Sep 29, 2020

Copy link
Copy Markdown

This pull request demonstrates the vim mode-dependent cursor mentioned (by @petobens) in #153 and requested (by me) in #220.

The cursor shape is

  • beam in Insert mode:
    image
  • block in Nav (Normal) mode
    image
  • Underscore in Replace mode
    image

I put the cursor code into the apply_settings() function in session.py, but I doubt I picked the right spot on my first try😄

This PR only effects vi mode.

Currently, this feature is enabled by default, but it can be disabled using by adding

options(radian.modal_cursor = FALSE)

to .radian_profile.

To install a version of radian with the modal cursor, run the line below.

python -m pip install git+https://github.com/mskar/radian.git@cursor

@randy3k

randy3k commented Oct 1, 2020

Copy link
Copy Markdown
Owner

Couldn't believe that some one takes it that far. Thank you for the contribution. I haven't reviewed it but I would like to make sure that backward compatibility is guaranteed.

@mskar

mskar commented Oct 1, 2020

Copy link
Copy Markdown
Author

@randy3k, how can backward compatibility be best guaranteed? GitHub Actions workflow to build different versions?

@mskar
mskar force-pushed the cursor branch 2 times, most recently from 8e1638c to ca2cfab Compare October 10, 2020 23:27
increase timeoutlen to facilitate use of vim combos like daW, diB, ct), etc.

add settings options to adjust [t]timeoutlen and disable modal_cursor
@mskar

mskar commented Oct 11, 2020

Copy link
Copy Markdown
Author

@randy3k, thanks for merging in #227.
I pulled the latest changes from the master branch into this PR.

@randy3k
randy3k force-pushed the master branch 2 times, most recently from b161529 to ac0e9cb Compare April 30, 2021 05:42
@sdelquin

sdelquin commented Apr 15, 2025

Copy link
Copy Markdown

Hello @randy3k. Is there any chance this feature from @mskar can be included on main branch of radian? Having different cursors for vim experience is very helpful. Thanks!!

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

Successfully merging this pull request may close these issues.

4 participants