I am using TeXStudio as my editor.
When creating macros for myself, it is sometimes convenient to know whether the cursor is inside delimiters (e.g., $...$, \[...\]).
Is there a built-in function in TeXStudio that does this job? I assume the editor knows this because codes inside delimiters are highlighted differently.