Is there a package to insert text via drop down menu


I have lists of table names among which I frequently have to choose one name to include in my code. It would be very useful if I could type a string, e.g. tables1, and a drop down menu comes out with the table names of this group so I can select one and the name is filled.

Alternatively if could be done entirely via menus, e.g. a tree menu with names of the groups (tables1, tables2, etc.) and a second level of table names. You navigate to the table name you want and it is filled within the code.

Is there any package that performs a similar task?


Please be more specific. Exactly what text are you trying to insert? Walk us through the whole workflow and we can probably recommend ways to solve the problem.

You probably want to use the snippets functionality, but without clearly defined examples of code, I can’t give you the correctly-formatted snippet code.


Hi, I aready use snippets, but it doesn’t seem the right solution in this case. I mainly write SQL queries. In every query I have to write the names of the tables that I am querying. Currently I look for the table name and copy paste it. I’m looking for a faster way to insert table names. The table names are organized in a tree structure:
and so on.

I need to quickly navigate to the table name.

Any ideas?


This is a very important piece of information to contextualize what you mean by “table names”.

I feel like the autocomplete-plus package should do just fine. By default, it will look through files you have open and use what you’ve written to complete text that doesn’t have a completion from an installed provider, so you should just be able to open a document and write out all of your table names, then type the first three letters and complete it with tab once the dropdown pops up.

You may need to check the settings for the autocomplete-plus package, if you’ve changed them at all.


Thanks, the problem with autocomplete is that I do not remember the initial letters of the table names, but if I see the names then I know which is the one I need, so I need the names to be suggested based on the group name alone. I do remember the name of the groups of tables. Table names are strings. I’ll try to explain more clearly. For example there is a group of tables called “Moltex Ltd”, and the table names associated with it are: “R634_ndg_201803”, “PERD_TOT_201703_ytd”, “INCA_TOT_201703_ytd”, “llp_TOTM_201803” and so on. There are many groups of tables with many tables (table names) within it. I need the table names to be suggested to me. I can only indicate the group name, in the above example “Moltex”. Hope this is clear now. Thanks a lot