2

I have a list of text snippets which I use frequently eg To whom so ever it may concern, as soon as possible, Feelfree to contact me on . Most tex editors allow command completion. Is there any way I can get suggestion and completion of these text snippets when I type few initial characters? If I get a solution with texstudeo, it would be best. But for that matter, changing an editor should not be an issue, except for emacs which I find difficult to master.

4
  • 1
    There are 2 pages of reviews on IDEs here. Using the find feature on your browser you can find those that have the features you want.
    – DJP
    Dec 10, 2014 at 4:47
  • 1
    I work on TeXstudio and it does have auto-completion. If you define a macro in your preamble, it will offer these commands later on, if you type the first letters.
    – LaRiFaRi
    Dec 10, 2014 at 6:02
  • I know you don't like it, but Emacs has text autocompletion/snippets features.
    – giordano
    Dec 10, 2014 at 8:13
  • Kile has text autocompletion capability. Not all command are recognized but you can add commands to its command list.
    – Astrinus
    Dec 10, 2014 at 9:25

1 Answer 1

3

You asked texstudio!

Open MacrosEdit Macros:

enter image description here

In this window,

  1. Click +Add. This should add the third macro.
  2. Enter a name
  3. Enter the text you want to be inserted by macro
  4. Click OK

Now, in Macros menu you have this:

enter image description here

Now in your tex file, press Shift + F3 the string To whom so ever it may concern will be inserted.

On the other hand, if you want it only for (one) text file, you may define a macro like

\newcommand*{\concern}{To whom so ever it may concern}

and use it like \concern{}

1
  • Upvote for the answer. But here you are actually expanding abbr to expansion. That simply means you have to remember what you are added. This won't work if there are say more than 100 snippets for which you cannot remember short cuts or abbreviations. It should suggest as you type. I use "typing-aid" from autohotkey. This is the only feature that force me to keep using windows rather than any *nix os.
    – Vaibhav
    Dec 10, 2014 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .