Skip to content

Commit

Permalink
keys: add map to open containing folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Nov 6, 2024
1 parent 9ecc698 commit db8e307
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/nxvim/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ nx.map({
desc = "Open File with System App",
wk_label = "System Open",
},
{
"<leader>fO",
function()
local cmd = jit.os == "OSX" and "open " or "xdg-open "
vim.fn.system(cmd .. vim.fn.fnamemodify(vim.fn.expand("%"), ":h"))
end,
desc = "Open Containing Folder",
wk_label = "Open Containing Folder",
},
{
"<leader>fy",
"<Cmd>let @+ = expand('%')<CR>",
Expand Down

0 comments on commit db8e307

Please sign in to comment.