I write a lot of Geany snippets. I would like to add a snippet for %cursor% when writing snippets. I added this in the [Default] snippets:

cur=%cursor%

Problem being that will evaluate to placing the cursor, so disappears.

I am looking for an escape sequence for the %. I have tried \% and %% but no luck.

cur=%curso%cursor%%

is an OK workaround as I only need to add an r, but is not ideal.

有帮助吗?

解决方案

The % is escaped with {pc} in Geany, so:

cur={pc}cursor{pc}

expands to %cursor%

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top