-
Notifications
You must be signed in to change notification settings - Fork 154
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
Default horizontal split hotkey #331
Comments
Personally I feel |
Yes Ctrl-v is already split vertical, which matches other plugins. It's the horizontal key mapping that's at issue here. While yes it's customizable, it's not totally clear how to actually customize since there are a lot of places this needs to happen (i.e. you can't just say globally horizontal split is now Ctrl-X) and there are 3 different actions and it's again not clear which one needs to be used and where (buf_split, file_split, git_buf_split). |
Oops I meant Perhaps this is better addressed in the wiki? |
I thought of something by better, I’ll just separate the default actions from the provider actions so you can at least make the change in one place instead. |
I was thinking that as well, but when I was looking at the code I wasn't sure how easy that was to do. |
Latest commit adds this functinality, without losing the ability to override a single provider's actions you can now also modify the defaults for files and buffer actions (which individual providers inherit from). These tables override the defaults completly so you have to define each action you're interested in (can also avoid the
require 'fzf-lua'.setup({
actions = {
files = {
["default"] = fzf_lua.actions.file_edit_or_qf,
["ctrl-x"] = fzf_lua.actions.file_split,
["ctrl-v"] = fzf_lua.actions.file_vsplit,
["ctrl-t"] = fzf_lua.actions.file_tabedit,
["alt-q"] = fzf_lua.actions.file_sel_to_qf,
},
buffers = {
["default"] = fzf_lua.actions.buf_edit,
["ctrl-x"] = fzf_lua.actions.buf_split,
["ctrl-v"] = fzf_lua.actions.buf_vsplit,
["ctrl-t"] = fzf_lua.actions.buf_tabedit,
}
},
buffers = {
actions = {
["ctrl-r"] = { fzf_actions.buf_del, fzf_actions.resume }
}
},
}) |
That's awesome thank you! |
It seems like most plugins use Ctrl-x as the hotkey for opening up in a horizontal split. Whereas, this plugin uses Ctrl-s, is there an appetite for me submitting a PR making Ctrl-x as the default horizontal split command? Currently I'm using the following setup to have this functionality in my setup:
The text was updated successfully, but these errors were encountered: