Live Code Templates - getting cursor position when the template was invoked?
Answered
I'm trying to create a template to generate a section header that is length limited to 78 characters regardless of indentation.
Is there a way to get the cursor position at the time the live code template was "invoked"?
Please sign in to leave a comment.
Should be possible with groovyScript and the API https://intellij-support.jetbrains.com/hc/en-us/community/posts/206794335-How-to-get-cursor-position-in-the-current-editor-. Probably not trivial, though.
So perhaps creating a simple plugin may be better.