3 ms·
The IDE could also do an automated ASCII to Unicode replacement for certain strings of characters if they are supported in a language, similar to how Microsoft
by cubefox 1y ago
The IDE could also do an automated ASCII to Unicode replacement for certain strings of characters if they are supported in a language, similar to how Microsoft Word automatically replaces (R) with ®, or the like.
- em-bee 1y agoin vim i can define abbreviations like this: :iabbr >= ≥ then, when typing ">=" it will automatically be converted to "≥" as soon as i hit space.
- cubefox 1y agoExactly. Though in an IDE it should only be done depending on whether the current language supports the Unicode operators in question. And ideally the replacement shouldn't happen when editing string literals. Though perhaps that is asking for too much.
- em-bee 1y agoin vim you can make these definitions dependent on the file type, which is also used to detect languages for eg syntax highlighting. so it's certainly possibly to define these only for a specific language. it should even be possible to define it based on the syntax detected: https://superuser.com/questions/487603/abbreviations-override-in-comments-and-quoted-text https://superuser.com/questions/487603/abbreviations-overrid...