plugin file URI handler

Plugins for SynWrite and CudaText...
Post Reply
Shovel
Posts: 141
Joined: 31.12.2019 10:16

plugin file URI handler

Post by Shovel »

Occasionally it is nice to have quick and simple bookmarks.
Github
This plugin opens file:/// links in CudaText, for example:

Code: Select all

file:///etc/fstab
file:///c:/WINDOWS/clock.txt
file:///install.inf
Just a filename (last line) will be looked for in the directory of the current file first, then in the directories specified in plugin's config file.

For this to work "links_regex" option needs to be modified:

Code: Select all

\\b(mailto:)?\\w[\\w\\-\\.]*@\\w[\\w\\-\\.]*\\.\\w{2,}\\b|\\b(https?://|ftp://|magnet:\\?|www\\.|ftp\\.)\\w[\\w\\-\\.@]*(:\\d+)...
to

Code: Select all

\\b(mailto:)?\\w[\\w\\-\\.]*@\\w[\\w\\-\\.]*\\.\\w{2}\\b|\\b(https?://|ftp://|file:///|magnet:\\?|www\\.|ftp\\.)\\w[\\w\\-\\.@]*:?(:\\d+)?(/[~\\w\\.\\-\\+\\/%]*)?(\\?[^<>'\"\\s]+)?(\\#[\\w\\-]*)?
uvviewsoft_
Posts: 17
Joined: 27.12.2020 08:31

Post by uvviewsoft_ »

seems it is OK plugin, can you please post file readme/readme.txt to Github? users of CudaText can open this readme from Addon Manager.

pls write in readme that user must change the option in user.json.
uvviewsoft_
Posts: 17
Joined: 27.12.2020 08:31

Post by uvviewsoft_ »

readme.txt appeared. I published the addon. thanks for your work!
Shovel
Posts: 141
Joined: 31.12.2019 10:16

Post by Shovel »

My pleasure :)
Post Reply