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
bind is ignored in config.fish #1495
Comments
You can't put custom bindings into config.fish. They get overwritten. Create a |
That works, thank you. That seems like very unexpected behavior. Why would the bindings get overwritten? Wouldn't it be better design if such bindings were not overwritten in the config file? |
Redefining the |
This isn't terribly well explained in the documentation - it's only in the I think there is some useful context in #21 but I suspect there are some potential bugs in this area. |
It is intuitive to put it in the config file.Think .screenrc, or .tmuxrc, .zshrc, etc. Wouldn't it be better if it was made to work in the config.fish? Why limit the behavior? That or at the very least give the user a warning on the console if a bind is detected in the file with a hint of where to put the bind. |
Similarly, in a non-interactive script, using I think the |
On second thought, emitting an event for every bind seems kind of overkill. I guess if you want to use |
How does one sets custom key bindings while having |
Ok, I did a quick fix for myself 257e55f. Not really sure what does
mean above the concerned part of code, so this quick fix might not be a good general solution? |
We can't run The real answer is to just create a custom function and set that as your key bindings: function my_vi_key_bindings
fish_vi_key_bindings
# add your own bindings here
end
set -g fish_key_bindings my_vi_key_bindings |
I see. Didn't occur to me. Thanks |
Duplicate of #230. |
what @faho said |
Just in case anyone runs across this, it was driving me crazy, but OMF had defined this in my /Users/MY_USERNAME/.local/share/omf/init.fish , so I just stuck the bind in there:
(note the bind \cr re_search ) |
@ip2k: As you might notice, that will still call your original fish_user_key_bindings, so you should define that instead. I don't believe that file is meant for user customization, so you'll have a bunch of issues (your binding disappearing on OMF update, most likely). |
I have set
bind \cr rsearch
in my config.fish In order to use the reverse-search implemented here: https://github.com/jbonjean/re-searchHowever, C-R does not invoke this program, only when I type in the bind manually does it have any affect.
The text was updated successfully, but these errors were encountered: