I want to test, if the cursor is currently in a comment line. For example in C it looks like this:
// This is a comment line
now it's also possible that it's a big comment section:
/* * Big comment section */
Now I'd like to read the current line and look what the first character is. Is there a function where I can compare a regex-pattern with the current line? Like this:
if match(getline(line(".")), "^[/\*]") (do something) endif
match seems to have another functionality according to the
:h match help page. Do you have an idea how I can achieve a "regex-pattern-comparison"?