mycli icon indicating copy to clipboard operation
mycli copied to clipboard

[Feature Request] Code snippets

Open Herz3h opened this issue 3 years ago • 2 comments
trafficstars

Would it be possible to have code snippets, like common queries. I find myself typing this a lot over course of the day:

SELECT X, Y FROM TABLE WHERE Z = ''

or similar queries.

It would be nice nice to be able to have snippets that you can expand. So for example, typing SELECT then pressing tab would result in:

SELECT _ FROM _

The cursor would be on the first underscore. This is obviously just an example, it could work for many type of queries.

Herz3h avatar Nov 30 '21 09:11 Herz3h

@Herz3h I realize that this is not exactly the same, but are you aware that mycli has favorite queries?

https://www.mycli.net/favorites

They might be helpful for your use case.

j-bennet avatar Nov 30 '21 20:11 j-bennet

Yeh I have seen that, but it's less flexible than code snippets

Herz3h avatar Dec 02 '21 21:12 Herz3h