For PDF-TeX syncing for Visuala Studio Code, it currently uses the arguments:
vscode://file"%file":%line
This is incorrect when %file
contains spaces, for example, since it needs to be URL-encoded (e.g., spaces replaced with instances of %20
). For now I'm using a URL-encoding command-line utility, as follows, but this is non-ideal (small performance penalty, for one thing).
vscode://file"$(urlencode "%file")":%line
Sorry, I hadn't finished: I was thinking the best solution might be to have a URL-encoded var like "%fileurl" available.
I don't think that's worth it, as it can easily be escaped, as you
indicate. It is alsi very rare,as virtually all scripts will use paths, as
command line utiliies virtually always do for files. And I don't see your
downsides, why a performance hut fir everybody on our code side to avoid
another one for the very few users like you?
Some considerations:
1) Visual Studio Code is very popular, I believe one of the two most popular text editors these days. This issue applies to VS Code on multiple platforms. So it’s not really “rare” at all.
2) The performance hit is in forking out a process, especially on Windows, but also other OSs. There is basically no performance hit in computing the URL-encoded version of a string within a process, since it can be done very efficiently.
3) There is no bundled or easily available URL encoder command-line program on macOS or Windows (and possibly not Linux either?). I had to write my own. AAs a consequence, this means it is not possible for a VS Code preset to exist.
Related
Bugs:
#1392Does this mean you modified the behaviour? I ddn't see any reply to the points I raised.
Sorry, yes, I did. see the preset setting for VS Code (you may need to re-select it).
Thank you, I appreciate that. It works perfectly, of course.
Related
Bugs:
#1392