This commit is contained in:
sankalp committed 2024-08-06 12:38:54 +05:45
1 parent 03a4c1878e
commit c07c04692d
7 files changed
+46 -98

No files matched your search

-31
View File
@@ -1,31 +0,0 @@
require("oil").setup({
default_file_explorer = true,
delete_to_trash = true,
skip_confirm_for_simple_edits = true,
use_default_keymaps = false,
keymaps = {
["q"] = "actions.close",
["g?"] = "actions.show_help",
["<CR>"] = "actions.select",
["<C-\\>"] = "actions.select_split",
["<C-enter>"] = "actions.select_vsplit", -- this is used to navigate left
["<C-t>"] = "actions.select_tab",
["<C-p>"] = "actions.preview",
["<C-c>"] = "actions.close",
["<C-r>"] = "actions.refresh",
["-"] = "actions.parent",
["_"] = "actions.open_cwd",
["`"] = "actions.cd",
["~"] = "actions.tcd",
["gs"] = "actions.change_sort",
["gx"] = "actions.open_external",
["h"] = "actions.toggle_hidden",
},
view_options = {
natural_order = true,
show_hidden = false,
},
win_options = {
wrap = true,
},
})
+11 -10
View File
@@ -504,18 +504,19 @@ local no_leader_mappings = {
{ ']j', '<C-i>', desc = 'Jump' },
}
if vim.fn.exists('$TMUX') == 1 then
local tmux_mappings = {
{ '<C-h>', '<cmd>NavigatorLeft<cr>', desc = 'Move Left' },
{ '<C-j>', '<cmd>NavigatorDown<cr>', desc = 'Move Down' },
{ '<C-k>', '<cmd>NavigatorUp<cr>', desc = 'Move Up' },
{ '<C-l>', '<cmd>NavigatorRight<cr>', desc = 'Move Right' },
{ '<C-\\>', '<cmd>NavigatorPrevious<cr>', desc = 'Previous Pane' },
}
no_leader_mappings = vim.tbl_extend('force', no_leader_mappings, tmux_mappings)
end
local tmux_mappings = {
{ '<C-h>', '<cmd>NavigatorLeft<cr>', desc = 'Move Left' },
{ '<C-j>', '<cmd>NavigatorDown<cr>', desc = 'Move Down' },
{ '<C-k>', '<cmd>NavigatorUp<cr>', desc = 'Move Up' },
{ '<C-l>', '<cmd>NavigatorRight<cr>', desc = 'Move Right' },
{ '<C-\\>', '<cmd>NavigatorPrevious<cr>', desc = 'Previous Pane' },
}
which_key.setup(setup)
which_key.add(n_mappings)
which_key.add(v_mappings)
which_key.add(no_leader_mappings)
if vim.fn.exists('$TMUX') == 1 then
which_key.add(tmux_mappings)
end