martinrotter / textosaurus

Cross-platform text editor based on Qt and Scintilla.
GNU General Public License v3.0
284 stars 44 forks source link

Links Detection #6

Closed smaragdus closed 6 years ago

smaragdus commented 6 years ago

Suggestion An option for automatic detection of links:

http:// https:// ftp:// mailto:

'Settings' - 'Editor' - new option- 'Links detection' plus two sub-options'- 'Open links on double click' & 'Open links on 'CTRL+Click'.

Usage Links detection plus an option to open them in default programs would be a handy enhancement for those using Textilosaurus as a general purpose text editor. My default text editor- AkelPad, does that right.

martinrotter commented 6 years ago

For me: https://github.com/jacobslusser/ScintillaNET/issues/111

indicSetHoverStyle(0, INDIC_ROUNDBOX); setIndicatorCurrent(0); indicatorFillRange(0, 15);

martinrotter commented 6 years ago

screenshot 2017-12-08 12 55 10

Is highlighting of URLs on mouse hover enough? Parsing whole input file for finding all URLs (+ re-parsing individual chunks on edit) is relatively expensive operation. On input does some extra work only if you hover it.

So would URL highlighting be enough just for mouse hovering? If you click hovered link it gets opened in default browser.

martinrotter commented 6 years ago

6df4fde

smaragdus commented 6 years ago

@martinrotter I have just checked the link detection- HTTP, FTP and Mailto links are detected and opened just fine, nice job. The Implementation looks similar to Notepad++, it is good enough for me, thanks.