Skip to content

Commit

Permalink
WIP: work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
mikavilpas committed Jun 23, 2024
1 parent 1efb488 commit 0de950b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
3 changes: 3 additions & 0 deletions lua/yazi/config.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---@module "plenary.path"

local openers = require('yazi.openers')
local keybinding_helpers = require('yazi.keybinding_helpers')

Expand Down Expand Up @@ -42,6 +44,7 @@ function M.default_set_keymappings_function(yazi_buffer, config)
vim.keymap.set({ 't' }, '<c-v>', function()
keybinding_helpers.open_file_in_vertical_split(config)
end, { buffer = yazi_buffer })
vim.keymap.set('t', '<esc>', '<esc>', { buffer = yazi_buffer })

vim.keymap.set({ 't' }, '<c-x>', function()
keybinding_helpers.open_file_in_horizontal_split(config)
Expand Down
9 changes: 0 additions & 9 deletions lua/yazi/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ function YaziFloatingWindow:open_and_display()
self:add_hacky_mouse_support(yazi_buffer)
end

vim.api.nvim_create_autocmd('ModeChanged', {
buffer = yazi_buffer,
callback = function()
-- HACK Sometimes pressing "<esc><esc>" exits insert mode the first time it's pressed.
-- Work around this by starting insert mode after the first time the mode changes.
vim.cmd('startinsert')
end,
})

vim.api.nvim_create_autocmd({ 'VimResized' }, {
buffer = yazi_buffer,
callback = function()
Expand Down

0 comments on commit 0de950b

Please sign in to comment.