Skip to content

README "override yet replicate the default mappings" is misleading #18

Open
@Paul-Aime

Description

@Paul-Aime

In the README is the following:

For example, to override yet replicate the default mappings you would define, the following in ~/.vim/ftplugin/python/pythonsense-custom.vim:

map <buffer> ac <Plug>(PythonsenseOuterClassTextObject)
map <buffer> ic <Plug>(PythonsenseInnerClassTextObject)
map <buffer> af <Plug>(PythonsenseOuterFunctionTextObject)
map <buffer> if <Plug>(PythonsenseInnerFunctionTextObject)
map <buffer> ad <Plug>(PythonsenseOuterDocStringTextObject)
map <buffer> id <Plug>(PythonsenseInnerDocStringTextObject)

...

So I did override all the keybindings, even if only modifying a few, so to have them all in one place to read.

However this does not replicate the default behavior, because map also apply to normal mode whereas default mappings are only omap and vmap (as I can tell by reading pythonsense.vim source code).

And all those mappings begin with i or a, which from normal mode make you go into insert mode.
So it introduces lag, or even bug, e.g. when typing idef to enter insert mode and starting to define a function, nothing will happen.

Maybe a note should be added on that in the README.

Btw, thanks for the great plugin!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions