Page 1 of 1

plugin file URI handler

Posted: 23.11.2020 17:27
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\\-]*)?

Posted: 27.12.2020 08:35
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.

Posted: 27.12.2020 10:45
by uvviewsoft_
readme.txt appeared. I published the addon. thanks for your work!

Posted: 27.12.2020 11:01
by Shovel
My pleasure :)