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.
-
1There 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.– DJPDec 10, 2014 at 4:47
-
1I 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.– LaRiFaRiDec 10, 2014 at 6:02
-
I know you don't like it, but Emacs has text autocompletion/snippets features.– giordanoDec 10, 2014 at 8:13
-
Kile has text autocompletion capability. Not all command are recognized but you can add commands to its command list.– AstrinusDec 10, 2014 at 9:25
1 Answer
You asked texstudio!
Open Macros
→ Edit Macros
:
In this window,
- Click
+Add
. This should add the third macro. - Enter a name
- Enter the text you want to be inserted by macro
- Click
OK
Now, in Macros
menu you have this:
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{}
-
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.– VaibhavDec 10, 2014 at 10:18