danielmagnussons / orgmode

orgmode is for keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system.
MIT License
753 stars 70 forks source link

Add a generic open external link file plugin #64

Open mrvkino opened 8 years ago

mrvkino commented 8 years ago

I have some file (ex: pdf) that I want to link in my file but sublime cannot open them. Adding a file plugin with [[file:]] could send a request to the os to open a file. For example on osx the call would become "open " and let the os figure it out.

danielmagnussons commented 8 years ago

There is support for that today, without the "file://" . Try with [[/home/daniel/.login]]

mrvkino commented 8 years ago

If the file linked is a pdf it will open the pdf in sublime instead of an external program. What I am talking about is a way of specifying a file to open in an external application.

danielmagnussons commented 8 years ago

Ah, yes i like it [[open:/path/here/to/something.jpg]]

ErichDonGubler commented 8 years ago

@danielmagnussons: The file opening works with relative paths in Windows, but not absolute ones:

- [ ] Some todo [[.\tasks\331885.org]]

...works. But this:

- [ ] Some todo [[C:\Users\erich.gubler\Desktop\tasks\331885.org]]

...does not.

Should I open a separate issue for this?

EDIT: I'm using Windows GVim right now, hence my expectation that these paths should work.

reignmaker commented 4 years ago

@ErichDonGubler this format should work - [ ] Some todo [[\C\Users\erich.gubler\Desktop\tasks\331885.org]]

ErichDonGubler commented 4 years ago

@reignmaker: In which working environment? There's Cygwin, MSYS2, WSL{,2}, a the GVim distribution for Windows. :) I'll amend my previous comment to include what I was referring to -- native GVim, which supports native Windows paths in most places already.

reignmaker commented 4 years ago

Hi @ErichDonGubler! I'm using Sublime 3, Git for Windows (Cygwin, I guess?) on Win 7.