Open carloxff opened 3 years ago
Interesting idea. Could you post your modified code here, or create a PR from it?
Hi,
I think my changes were made on an older version of the code (from installation package), so I suppose it's better to paste here the modified call:
Just replace this line:
pasteAndShowMessage(fileName);
With this statement:
if (vscode.window.activeTextEditor.selection.isEmpty) {
pasteAndShowMessage(fileName);
}
else {
const currentLine = vscode.window.activeTextEditor.selection.active.line + 1;
pasteAndShowMessage(fileName + ':' + currentLine);
}
Regards
Thanks for the snippet! I will try to include this in the next version.
Second that, would be nice to have it as a feature
It would be wonderful to have an option to add the currently selected line number to the filename, in this form:
filename.cpp:1234
This would be very useful for setting breakpoints into an external GDB debugger, for example.
I have locally modified your code to do this in my VSCode instance, but I think it could be useful for the public.
Nice extension, thanks!