Auto-Completion in Emacs, LaTeX and Gams

The fun with Emacs is that you can discover new (or old) stuff that makes your life much easier on an almost weekly base. I was reading the manual on Emacs Speaks Statistics and discovered that there is a mode called auto-completion. I googled it, installed it and after some experimenting, I got it running. You can find it here. It comes with autocompletion for some programming languages (Python, Ruby, C+, etc.) but not for LaTeX, so I googled further and discovered an extension called auto-complete-latex (you can download it here.
Here are some screenshots: You just start typing and it suggests a keyword or if you wait a little bit longer it gives you a dropdown llist. You can jump to the next suggestions using the tab-key.
It doesn’t matter if you use capitals or not:
and it also keeps track of words in the actual document. Here an example of my paper on parking. As you see the word “Parking appears, when I typ “par”.
For Gams there is no dictionary, so I wrote one myself and added it to the dictionaries. I only did not manage to start auto-complete for Gams automatically. But this can be done with M-x auto-complete-mode.
Update:
;; ac-modes – major modes ac can run on
(add-to-list ‘ac-modes ‘gams-mode)

;; toggle auto-complete in all buffers

(global-auto-complete-mode t)

(with thanks to a reader)
These extensions make Emacs now to a modern text editor.

One thought on “Auto-Completion in Emacs, LaTeX and Gams

  1. If gams is a major mode called gams-mode

    ;; ac-modes – major modes ac can run on
    (add-to-list ‘ac-modes ‘gams-mode)

    ;; toggle auto-complete in all buffers
    (global-auto-complete-mode t)

Leave a Reply

Your email address will not be published. Required fields are marked *

*