radian icon indicating copy to clipboard operation
radian copied to clipboard

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

Open mskar opened this issue 4 years ago • 3 comments

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

mskar avatar Sep 29 '20 17:09 mskar

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.

randy3k avatar Oct 01 '20 04:10 randy3k

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

mskar avatar Oct 01 '20 15:10 mskar

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

mskar avatar Oct 11 '20 03:10 mskar