Saturday, September 10, 2016

Papeeria News, Sep 10: live autocompletion with snippets

TL;DR: autocompletion now suggests TeX environments and math macros; live autocompletion is turned on by default.

Autocompletion worked in Papeeria since the very early days, however user had to trigger it manually by hitting Ctrl+Space. Besides, it was very basic and suggested words from the opened file as completions.

Today  we updated autocompletion. Now it suggests the most important environments and macros, such as lists and sections. When cursor enters display maths, autocompletion also suggests math macros, from greek letters to sums and integrals.

Autocompletion is now live and doesn't require explicit Ctrl+Space keystroke from user. If you're not the fan of live completion, you can switch it off in the editor settings panel.

Autocompletion popup inside equation suggesting completions for \s

Useful hint for those who want to be autocompletion ninja: Tab key is your friend. It applies the selected completion (just like Enter) and moves cursor between the arguments if there are any in the chosen snippet. Snippet for \sum on the picture above has three arguments, and you can fill in them quickly using Tab key.