regexes in hints

Ask how to do things or if a certain feature is available in the program.
Post Reply
owend
Posts: 21
Joined: 19 Jan 2020 05:42

regexes in hints

Post by owend »

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 >>>"

I created type 2 hints as per this image.
hint_styles.png
hint_styles.png (12.07 KiB) Viewed 2595 times

But the resulting hint popup lists all possibilities and only the text of the last one as shown here.
So it seems like I need to have a regex in the hint ID, but this doesn't appear to work.
Can anyone suggest how to achieve what I need?
echo hint.gif
echo hint.gif (94.65 KiB) Viewed 2595 times
Post Reply