regexes in hints

Make a request or discuss new features.
Post Reply
owend
Posts: 21
Joined: 19 Jan 2020 05:42

regexes in hints

Post by owend »

As I have not had a reply in this post , I am assuming this is not possible, so I would like to request it as a feature addition.
Sorry to cross post. I was unable to move the topic.



In the syntax file I am maintaining, I have many hints.
In cases where there are several words which begin with the same syntax, but which have different meanings, I am not getting the results I need.

For example

echo "some string" - sends the quoted string to the console
echo >"filename" "some string" - Creates a files called "filename" and appends a line containing "some string" + CRLF
echo >>"filename" "some string" - Opens an existing file called "filename" appends a line containing "some string" + CRLF
echo >>>"filename" "some string" - Opens an existing file called "filename" appends "some string" with no CRLF

So each should display a different hint depending on whether the starting text is
echo "
echo >"
echo >>"
echo >>>"


See original post for images and further details.
User avatar
Rickard Johansson
Site Admin
Posts: 6628
Joined: 19 Jul 2006 14:29

Re: regexes in hints

Post by Rickard Johansson »

Hints only work with single words e.g. arcsin(). Any parentheses or symbols are stripped. The editor will search for a "arcsin" hint when the mouse is hovering the function.

You could add only one hint named "echo" and add all info for all other versions in the description:

echo
---------------------

Code: Select all

echo "some string" - sends the quoted string to the console
echo >"filename" "some string" - Creates a files called "filename" and appends a line containing "some string" + CRLF
echo >>"filename" "some string" - Opens an existing file called "filename" appends a line containing "some string" + CRLF
echo >>>"filename" "some string" - Opens an existing file called "filename" appends "some string" with no CRLF
Post Reply