try/except in Slack means the abbreviation had no ExpandIn
log, err, fn are excellent in an editor.
In Slack, a coworker gets a block of Python. That is not the expander being โtoo smart.โ You never told it to fire only in the IDE.
What developers repeat is boilerplate, not algorithms: try/except, license headers, stock PR text, a prompt with a language menu. Those should be abbreviations, not clipboard luck.

Caret where you actually type
try:
%c%
except Exception as e:
logger.exception("failed")
raise%c% is the insertion point after expand. Tab-stops use %cv% in the FillIn reference.
Same idea in several languages: one snippet, several files, each with its own abbreviation โ not three clones that drift. See Snippets.
Only in the editor
Turn on ExpandIn (Pro) for the code group and leave VS Code, JetBrains, the terminal. Chat and browser get another prefix, such as msg-.
Keep โrequire a trigger keyโ. Without it, the first two letters of log can vanish. Demos, passwords, games: pause expansion from the tray.
Script output, not a key-logger macro
Pro can set a snippetโs environment to JavaScript, Shell, Python, or PowerShell and insert stdout (UUID, formatted date, clipboard rewrite). This is not โrecord my keystrokes.โ Custom runtimes live in Settings. See Scripts.
Heavier interaction (pick a repo, call an API) is a plugin. A plugin is still a snippet with plugin_mode, not a second table.
Do not
- Do not stuff a whole framework generator into one snippet. Snippets insert. They are not a scaffolding product.
- Do not concatenate unchecked shell in a script, even on your own machine.
- Free tier has no code execution and no ExpandIn. Start with plain-text boilerplate.
Related: AI programming, Abbreviation hygiene.