Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I want to open file in finder from nvim-tree. I find resolved issue #2430, but I dont understand which mapping open file using system_open.
Also I find mapping for Run system and then I press s on file it opens file content on TextEdit, not finder. How to setup opening file on finder?
I have nvim v0.11.0 and nvim-tree v1.12.0

You must be logged in to vote

I setup system_open next only for macos:

{
  system_open = {
    cmd = "open",
    args = { "-R" },
  },
}

According vim.ui.open docs there is no ability to pass -R option of open command to open file in finder.

Replies: 1 comment · 7 replies

Comment options

I setup system_open next only for macos:

{
  system_open = {
    cmd = "open",
    args = { "-R" },
  },
}

According vim.ui.open docs there is no ability to pass -R option of open command to open file in finder.

You must be logged in to vote
7 replies
@dro-sh
Comment options

I think it would be nice to have ability to specify command for specific OS, for example, for macos override command as I set, but for linux/windows use default

@dro-sh
Comment options

@alex-courtis add tip about opening selected file at Finder

@alex-courtis
Comment options

I think it would be nice to have ability to specify command for specific OS, for example, for macos override command as I set, but for linux/windows use default

You can do this yourself with something like:

  ---
  },
  system_open =
    vim.fn.has("mac") == 1
    and {
      cmd = "open",
      args = { "-R" },
    }
    or nil,
  git = {
    ---
@alex-courtis
Comment options

@alex-courtis add tip about opening selected file at Finder

Many thanks!

@dro-sh
Comment options

I think it would be nice to have ability to specify command for specific OS, for example, for macos override command as I set, but for linux/windows use default

You can do this yourself with something like:

  ---
  },
  system_open =
    vim.fn.has("mac") == 1
    and {
      cmd = "open",
      args = { "-R" },
    }
    or nil,
  git = {
    ---

Thanks, expand tip with this recommendation

Answer selected by dro-sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.