I like that _ is treated as a keyword character for most purposes, but for abbreviations I would like _ to trigger an abbreviation. Is there a way to automatically do this or is my best option to press <C-]>
before typing the underscore?
Use Case: if I have a long word that I type often, I might have variables containing that long word (e.g. table names of the form myverylongname_foo_table), and would like the abbreviation to activate in the middle of typing that, just after pressing the underscore.
You can use a map to "overwrite" the underscore behavior:
inoremap _ <C-]>_