Call external tool with byte offset from the beginning of a file
Answered
Is it possible to call external tool with selection or cursor position specified as byte offset from file beginning instead of line and position?
Please sign in to leave a comment.
There is an $SelectedText$ macro (Text selected in the editor) available for the external tool which you can use in External tool's Paramaters field. To select text you can record an Editor Macros
Finding that selected text is nice, however how can one get the byte offset of the carat in the current file?
There is no macro for that. Request is welcome at https://youtrack.jetbrains.com/issues/IDEA.
Thanks for the prompt reply. I was not aware of that issue tracker site. Looks like there already is a related issue. https://youtrack.jetbrains.com/issue/IDEA-165314