-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

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?


Posted in: s/vim

๐Ÿš€ stack [mod]

2023-12-28 ยท 5 months ago


1 Comment


๐Ÿ satch ยท Dec 29 at 04:22:

how's this:

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

-- Response ended

-- Page fetched on Sun May 19 09:27:01 2024