💾 Archived View for bbs.geminispace.org › s › vim › 13150 captured on 2024-03-21 at 18:40:47. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-02-05)
-=-=-=-=-=-=-
I just wasted an hour searching for a way to create an iabbrev that triggers only at beggining of line.
Say I want to convert a '===' to a '/*====================*/, but if and only if the === was typed at the start of its own line.
Is that even possible?
2023-12-28 · 3 months ago
how's this:
:iabbrev <expr> === getline('.')[0:2] == '===' ? '/*====================*/' : '==='