prompt-toolkit / ptpython

A better Python REPL
BSD 3-Clause "New" or "Revised" License
5.19k stars 277 forks source link

Enable modal (vi) cursor in config.py #548

Closed teroyks closed 1 year ago

teroyks commented 1 year ago

How do you set the cursor shape to Modal in config.py?

mohamed-180 commented 1 year ago

In your config.py you can add

  repl.cursor_shape_config = 'Modal (vi)'

under the def configure(repl): function .

The options here is 'Block' , 'Underline', 'Beam', 'Blink under' , 'Blink block' , 'Blink beam' .

teroyks commented 1 year ago

@mohamed-180 Thanks, that did the trick!

I added a PR to include this setting in the config example so that others can find it too.