Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readline vi-mode remapping compatibility #259

Closed
vanya-robertson opened this issue Oct 8, 2023 · 8 comments
Closed

Readline vi-mode remapping compatibility #259

vanya-robertson opened this issue Oct 8, 2023 · 8 comments
Labels
bug Something isn't working solved

Comments

@vanya-robertson
Copy link

I am a non-QWERTY user who cannot make vi-mode remaps in readline.cfg. Behaviour seems the same, no matter what I try.

I would welcome any solution.

Thank you,
Vanya

@leo-arch
Copy link
Owner

leo-arch commented Oct 9, 2023

Hi Vanya, thanks for reporting. What are you trying to accomplish exactly? A concrete example would be really useful to carry out a few tests. Btw, do you mean readline.clifm, isn't it?

EDIT: Is the INPUTRC environment variable defined in your system? If yes, this is why readline.clifm isn't read at all (try removing this variable from your environment, or run in secure-environment mode via --secure-env).

@vanya-robertson
Copy link
Author

Hi, Leo.

INPUTRC is not defined.

In readline.clifm, i have these lines:

$if mode=vi                                      
    set keymap vi-move                                 
    "i": backward-char
$endif 

Esc does enter me into vi-mode, as the qwerty keybindings work. I would like to remap i to backward-char, but there is no change in behaviour.

@leo-arch
Copy link
Owner

leo-arch commented Oct 9, 2023

Have you been able to do this in Bash (via ~/.inputrc)? I've tried and failed. The point is: is this issue clifm-specific?

@vanya-robertson
Copy link
Author

When set in .inputrc, it works in bash, python and tasksh, all readline programs; it does seem to be clifm-specific.

I can unbind the hjkl keys in readline.clifm:

$if mode=vi                                      
    set keymap vi-move
    "h":
    "j":
    "k":
    "l":
    "i": backward-char
$endif 

@leo-arch
Copy link
Owner

I'll keep investigating.

@vanya-robertson
Copy link
Author

Thanks, man

@leo-arch leo-arch added the bug Something isn't working label Oct 10, 2023
@leo-arch
Copy link
Owner

Hey @vanya-robertson, made a little modification. Could you give it a try now?

@vanya-robertson
Copy link
Author

Works perfectly, you absolute legend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working solved
Projects
None yet
Development

No branches or pull requests

2 participants