Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underline URLs, Directories & Make run file optional #28

Closed
ghost opened this issue Dec 31, 2014 · 3 comments
Closed

Underline URLs, Directories & Make run file optional #28

ghost opened this issue Dec 31, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 31, 2014

First, let me say thanks for this plugin, it combines two plugins that I liked to use. But are some useful features that I like on "clickable url" that would make this one perfect. It would be great if it was we had the URLs and Directories underlined, at least give a settings option to do it. Also, I don't really run relative files to be honest, as I don't think many front end developers do. So It would be good to have a setting to just be able to skip the 'run' command and go straight to use edit.

Thank you.

@jbshirk
Copy link

jbshirk commented Jun 12, 2017

If this underlined existing local URIs blue, and missing, red, this would practically become a markdown wiki.

@kylebebak
Copy link
Collaborator

kylebebak commented Aug 9, 2018

@blacksky86

You can now disable the run option by setting file_extra_commands and folder_extra_commands to false in your settings file.

Regarding clickable/highlighted URLs and paths, this would be a big undertaking. The plugin doesn't parse text in views to assign semantic meaning to URLs or local URIs. It would be entirely new functionality, and would make this a different plugin.

Local URIs especially would present a lot of problems. Right now, if you have a directory structure like this

.
├── a.txt
├── b.py
├── c

And you have the letter "c" somewhere in a.txt, this is valid local URI, at least from Open URLs point of view. You could hover over "c", run Open URL, and you would be prompted to edit the file c.

In other words, from Open URL's point of view, every char or series of chars in a file is a potentially valid local URI!

To get around this, you could parse the file for anything that starts with a path separator. E.g. on OSX, look for anything that starts with ./, ../ or /, and check to see if what comes after is an existing local URI.

But TBH, highlighting local/remote paths is probably beyond the scope of this plugin.

@kylebebak
Copy link
Collaborator

Update: the run option is now disabled by default. It has been replaced with an open with default application command, which can be invoked on any file.

Again, highlighting web URLs is beyond the scope of this plugin. It also seems to me that it doesn't fit well with the plugin to add functionality that will only work with web URLs, when the rest of the plugin handles files, folders, and other URLs as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants