update
This commit is contained in:
parent
b247db8531
commit
9d10df7ed5
|
|
@ -42,8 +42,15 @@ end, { desc = 'Hover (LSP)', silent = true })
|
|||
-- Netrw file explorer keymaps
|
||||
-- Open netrw in new tab at current file's directory
|
||||
map('n', '<leader>te', function()
|
||||
local current_file_dir = vim.fn.expand('%:p:h')
|
||||
vim.cmd('tabnew')
|
||||
vim.cmd('Explore ' .. vim.fn.expand('%:p:h'))
|
||||
end, { desc = 'Tab explore (netrw in new tab)', silent = true })
|
||||
vim.cmd('Explore ' .. vim.fn.fnameescape(current_file_dir))
|
||||
end, { desc = 'Tab explore (current file dir)', silent = true })
|
||||
|
||||
-- Open netrw in new tab at project root (cwd)
|
||||
map('n', '<leader>tE', function()
|
||||
vim.cmd('tabnew')
|
||||
vim.cmd('Explore ' .. vim.fn.fnameescape(vim.fn.getcwd()))
|
||||
end, { desc = 'Tab explore (project root)', silent = true })
|
||||
|
||||
return {}
|
||||
|
|
|
|||
|
|
@ -29,4 +29,4 @@ vim.opt.listchars = {
|
|||
|
||||
-- Enable line numbers and relative line numbers
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.relativenumber = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue