[texworks] 'Improved' auto-completion

Herbert Schulz herbs at wideopenwest.com
Sat Aug 17 22:43:50 CEST 2013

On Aug 17, 2013, at 3:03 PM, Joseph Wright <joseph.wright at morningstar2.co.uk> wrote:

> Hello all
> In the process of answering
> http://tex.stackexchange.com/questions/118038/texworks-auto-complete, I
> took a look at the auto-complete text in TeXstudio. I wonder whether
> people in general feel that the approach it takes, with
> package-by-package completion outcomes and only auto-completion starting
> from the begin of actual commands is sensible? Do my comments about a
> TeXworks interface offering similar functionality make sense? (One file
> per package, tick-box or script-selected activation.) That would also
> offer an easy route to turn of non-relevant auto-completions (LaTeX
> names in ConTeXt, etc.). Before I post an issue in the tracker, I'd like
> to see what people think.
> --
> Joseph Wright


AutoCompletion in TeXShop has been extended since the time when it used for TeXworks.

It is now possible to surround a first argument place holder with two #INS# statements, i.e., #INS#•#INS#, and it will be selected; that allows all arguments to have place holders, •, including the first one. Not only that, you can have a place holder that starts with •‹ and ends with › surrounding a comment so you can add a short memory jogger (note: ‹ and › are NOT < and > but open/close single guillemet quotes). When you jump to a comment the complete comment is selected. Finally, AutoComplete in TeXshop retains indentation for those that like to ``pretty print'' environments. PS: that file MUST be saved in UTF-8 Unicode since it uses non-ascii characters and is read in by TeXShop as UTF-8.

As before, the Completions.txt file can be edited to customize spacing, etc., as well as add/delete commands and abbreviations. Make it yours.

Finally, the Completions.txt file supplied is for LaTeX. I have put out a request on the Mac OS X TeX list for help to create a separate file for use with Context but got no response to my request.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

More information about the texworks mailing list