ropevim icon indicating copy to clipboard operation
ropevim copied to clipboard

How to disable shortcuts?

Open DanielLoney opened this issue 4 years ago • 3 comments

I tried doing let ropevim_enable_shortcuts=0 in my vimrc but the shortcuts are still being bound. How would I properly disable all shortcuts?

DanielLoney avatar Jul 06 '21 10:07 DanielLoney

I also tried this with both let ropevim_enable_shortcuts=0 and let g:ropevim_enable_shortcuts=0 and it seems to create the shortcuts in both cases. The switch to set the shortcuts is done here: https://github.com/python-rope/ropevim/blob/55fe3e2a848f3acd539f1c1892fd6116177c48d3/ropevim.py#L520-L521

and env.get does the magic of testing for existence and prepending g:ropevim_: https://github.com/python-rope/ropevim/blob/55fe3e2a848f3acd539f1c1892fd6116177c48d3/ropevim.py#L88-L95

It seems that env.get("enable_shortcuts") returns 0 and the noremap commands never executed, but the shortcuts are still available.

eivindjahren avatar Jul 16 '22 06:07 eivindjahren

Ah, I see now that the problem is that add_command does not respect enable_shortcuts.

https://github.com/python-rope/ropevim/blob/55fe3e2a848f3acd539f1c1892fd6116177c48d3/ropevim.py#L325-L331

This is as per the documentation, but it is subtle and not what the user expects.

eivindjahren avatar Jul 17 '22 16:07 eivindjahren