Understanding what Position.character represents and how to convert this to Col #1616
-
I am having hard time figuring out what const editor = vscode.window.activeTextEditor;
const charOffset = editor.selection.anchor.character; How does one go from |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @callmephilip , If you need to detect the column position of the cursor, you should use And by the way, both Hope this helps |
Beta Was this translation helpful? Give feedback.
-
@alefragnani thanks for the suggestions. I think I have finally figured it out. Reposted my solution in the relevant SO thread https://stackoverflow.com/questions/64791832/vscode-how-can-i-determine-the-cursors-column-position-within-an-editor/78989763#78989763 |
Beta Was this translation helpful? Give feedback.
@alefragnani thanks for the suggestions. I think I have finally figured it out. Reposted my solution in the relevant SO thread https://stackoverflow.com/questions/64791832/vscode-how-can-i-determine-the-cursors-column-position-within-an-editor/78989763#78989763