texiteasy icon indicating copy to clipboard operation
texiteasy copied to clipboard

More intelligent macro completion

Open pierreporte opened this issue 8 years ago • 0 comments

I was thinking about having more intelligent macro completion while adding more of them for headings in #26. What I mean is that to type something that is to be expanded into something bigger is not the same as to use the completion. In the first case it is a kind of shortcut; in the second case, it is a proposition of code that match an incomplete entry. Knowing this, it is not very clever to enable macros with a wide range of text and we should think carefully of it in order to be used more efficiently and not brings confusion with the auto-completion.

For example, let’ consider a macro to create a figure environment. What is not to be done is to define the shortcut text as fig OR figu OR figur OR figure but to keep as few options as possible, yet quite obvious for the user. For this example, we should keep only fig OR figure.

If this issue is accepted, I would like that everyone interested in this feature make proposition for built-in macros (current and future). I already did the work for headings (see pull request #26).

Partial list to begin with:

Result Shortcuts
\part part
\chapter chap, chapter
\section sec, sect, section
\subsection ssect, ssect, ssection, subsec, subsect, subsection
\subsubsection sssect, sssect, sssection, subsubsec, subsubsect, subsubsection
\paragraph par, paragraph
\subparagraph spar, sparagraph, subpar, subparagraph
figure env. fig, figure
table env. tab, table

(In the table, there are sometimes quite a lot of shorcuts only because these are special cases.)

pierreporte avatar Apr 02 '16 12:04 pierreporte