<div dir="ltr"><div>> Can you give me an example of what is meant by `context sensitive'?<br></div><div>As the author behind an autocompletion system for texworks [1], this is my understanding of context sensitive autocompletion.</div>

<div>I hope that this will qualify the discussion and not take it to far away from the original topic.</div><div><br></div><div>An autocompletion system that does not use information about the context is insertion of a fixed string. All invocations of the script will insert the same string af the cursors current location. This is level 0 of context awareness.</div>

<div><br></div><div>Level 1 of context awareness is that the autocomplete script looks at the contents of the line where the cursor is placed.</div><div>Based on the contents of the line a suitable completion is suggested based on some king of pattern matching.</div>

<div>This is how texworks builtin autocompleter works right now.</div><div><br></div><div>Level 2 of context awareness is to look at the lines before the cursor and provide suggestions based on the content of these lines. That could be completion of references to sections or figures. In addition it is possible to close unclosed environments.</div>

<div><br></div><div>Level 3 is to look at the contents of all open files related to the project and search for completion candidates (label names, bibtex references, etc.)</div><div>This level of autocompletion is partly implemented in the script demonstrated at [1] and available from [2].</div>

<div><br></div><div>Best regards, </div><div>Henrik Skov Midtiby</div><div><br></div><div>[1] Youtube video of the autocompletion script in action, <a href="http://www.youtube.com/watch?v=0-zcFG-JhMg">http://www.youtube.com/watch?v=0-zcFG-JhMg</a></div>

<div>[2] Git repository containing the autocompletion script, <a href="https://github.com/henrikmidtiby/TeXworks-scripts/tree/master/autocomplete">https://github.com/henrikmidtiby/TeXworks-scripts/tree/master/autocomplete</a></div>

<div><br></div><div><br></div></div>