Skip to content

Commit

Permalink
fix!: remap default horizontal split c-s -> c-x
Browse files Browse the repository at this point in the history
This is done to avoid overriding an existing yazi keybinding ("search
none", which cancels the ongoing search)

Fixes #31
  • Loading branch information
mikavilpas committed Apr 16, 2024
1 parent 9a1f14c commit e9dce4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ You can optionally configure yazi.nvim by setting any of the options below.
These are the default keybindings that are available when yazi is open:

- `<c-v>`: open the selected file in a vertical split
- `<c-s>`: open the selected file in a horizontal split
- `<c-x>`: open the selected file in a horizontal split
- `<c-t>`: open the selected file in a new tab

Notice that these are also the defaults for telescope.
Expand Down
2 changes: 1 addition & 1 deletion lua/yazi/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function M.default_set_keymappings_function(yazi_buffer, config)
M.select_current_file_and_close_yazi()
end, { buffer = yazi_buffer })

vim.keymap.set({ 't' }, '<c-s>', function()
vim.keymap.set({ 't' }, '<c-x>', function()
config.open_file_function = openers.open_file_in_horizontal_split
config.hooks.yazi_opened_multiple_files = function(chosen_files)
for _, chosen_file in ipairs(chosen_files) do
Expand Down

0 comments on commit e9dce4f

Please sign in to comment.