apjanke / vscode-octave-hacking

VS Code extension for GNU Octave programming
https://marketplace.visualstudio.com/items?itemName=apjanke.octave-hacking
MIT License
11 stars 3 forks source link

Disable auto-closing of ' (single quotes) #7

Open v-kydela opened 3 years ago

v-kydela commented 3 years ago

Apostrophes should not be auto-closed in Octave because they're not used in pairs

apjanke commented 3 years ago

What do you mean by "they're not used in pairs"? Single quotes are delimiters for single-quoted string literals.

I could see an argument for not closing them, since they're also used as the matrix transpose operator. But I think using them as string literals is more common than transposes.

v-kydela commented 3 years ago

I have only ever used them as the matrix transpose operator, so auto-closing them is a constant annoyance. Strings have an alternative quotation character to use, while transposes do not.

There seem to be three Octave language extensions for VSCode and all of them auto-close apostrophes, so there doesn't seem to be an option for coders like me who use apostrophes for transposes more often than string literals.

apjanke commented 3 years ago

Hmm. I don't know about turning it off globally, since I think single-quoted strings are common for Octave programmers in general, especially those wanting to maintain compatibility with Matlab code. Maybe there's a way to add a configuration option to the extension to turn it off.