# Text Editor Autocompletion vs direct LaTeX macros

In terms of research paper writing and in general usage, is there a preferred convention for one or the other? I'd like to know simply so that I get into the habit of using the norm as opposed to forcing myself to adopt a new procedure in the future.

By "text editor autocompletion", I mean the text editor has the feature that writing something like bb expands into \mathbb{}, where as for LaTeX macros, we define a new command in the preamble and employ it as \bb{}.

I apologize if this is too soft a question for StackExchange, although I do not know a better location to ask this.

• Whenvever the editor provides auto completion use it and whenever it is not, if it is absolutely needed or you have some other reason, define a macro. But here one should be careful in choosing macro names for they might have already been used resulting in error. I add some words like \mybb to make it unique. – user11232 Feb 23 '14 at 0:41
• This is not too soft for our sites. Since we treat only one very special language at a time, we allow soft question about good or bad coding styles and habits. However, I believe that this has been asked before, I just can't find it now. – yo' Feb 23 '14 at 0:42
• Very short custom macro names can be bad for at least two reasons: 1) their name can clash with primitives/macros of packages 2) they can make the code obscure. My rule of thumb: if what you need is speed in typing use autocompletion, if instead you need a semantic tag use a macro. – Bordaigorl Feb 23 '14 at 0:46
• These are great responses. Mind expanding a bit and including it as an answer? – Dustin Tran Feb 23 '14 at 1:20
• Also, journals etc. which accept LaTeX are likely to be much happier if you use autocomplete as they then get a document which uses standard commands. They will be significantly less keen on a document full of author-created macros. Whether this matters is rather discipline specific. If nobody in your field accepts LaTeX, it is essentially a non-issue. (My code can be as eccentric as I like so long as the result looks OK.) Although, even then, conversion (e.g. to Word as often required) is easier with standard macros. – cfr Feb 23 '14 at 2:11

I particularly hate unsolicited autocompletion (like in Word or LibreOffice) because often is not helping, but distracting. A requested autocompletion, either through a shortcut (ctrl-B) or a menu (LaTeX> Font Styles> Boldface) is fine, especially if the user can define the shortcuts. But a little problem is to remember all the shortcuts and menus. If you change between several editors for some reason, this could be a problem.