💾 Archived View for bbs.geminispace.org › u › satch › 13179 captured on 2024-02-05 at 14:26:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2024-03-21)

-=-=-=-=-=-=-

Comment by 🐐 satch

Re: "Q: Abbreviations, but only at beginning of line"

In: s/vim

how's this:

:iabbrev <expr> === getline('.')[0:2] == '===' ? '/*====================*/' : '==='

🐐 satch

2023-12-29 · 6 weeks ago

Original Post

🌒 s/vim

Q: Abbreviations, but only at beginning of line — 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?

💬 stack [mod] · 1 comment · 2023-12-28 · 6 weeks ago