- 
                Notifications
    You must be signed in to change notification settings 
- Fork 271
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesthow-towontfixThis will not be worked onThis will not be worked on
Description
Did you check the docs?
- I have read all the docs.
Is your feature request related to a problem? Please describe.
Sometimes I want to quickly open an image or a folder using the corresponding application in my OS.
Describe the solution you'd like.
I want to have a mapping to trigger the OS default application if I want.
Describe alternatives you've considered.
Right now I have created a custom mapping to solve this:
window = {
        mappings = {
          ["O"] = {
            command = function(state)
              local node = state.tree:get_node()
              local filepath = node.path
              local osType = os.getenv("OS")
              local command
              if osType == "Windows_NT" then
                command = "start " .. filepath
              elseif osType == "Darwin" then
                command = "open " .. filepath
              else
                command = "xdg-open " .. filepath
              end
              os.execute(command)
            end,
            desc = "open_with_system_defaults",
          },
        },
      },Additional Context
No response
yehuohan, Zz1-0817, vinioliveira, agoodshort, timhugh and 3 moremigueltc13, rikutons, Kenmac589, uthmanmoh, ArinFaraj and 3 more
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesthow-towontfixThis will not be worked onThis will not be worked on