Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

in vim i can define abbreviations like this:

    :iabbr >= ≥
then, when typing ">=" it will automatically be converted to "≥" as soon as i hit space.


Exactly. 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.


in 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-overrid...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: