.. _Content Assist:

Content Assist (Autocomplete)
=============================

.. rst-class:: lead

Content assist (autocomplete) can be triggered explicitly if you press :kbd:`Ctrl+Space` in any code context.

Some of the contexts when content assist is **triggered automatically** as you type are:


-  when you type a **dot** (.) for accessing a struct member (field, method etc) as in *bfm.do_write()*
-  when you type a **compare** (==) in an expression as in *if (mode ==*

Proposals are presented in a list for you to choose from. Moving through proposals you can quickly see the related documentation.

Press  :kbd:`Enter` or :kbd:`Click` to select a proposal or :kbd:`Esc` to cancel the assist.

.. figure:: ../../images/vlogdt-content-assist-example-1.png

.. figure:: ../../images/vlogdt-content-assist-example-2.png

.. figure:: ../../images/vlogdt-content-assist-example-3.png

Sometimes autocomplete has many proposals that are split in several categories:


#. .  the first one is for things you can access in a scope (wires, regs, functions, tasks etc. depending on the enclosing scope)
#. .  the second one is for code templates
#. .  the third one is for other things, like module instances

If you press :kbd:`Ctrl+Space` the first time, you'll see a small indication in the proposals pop-up window at the bottom, something like "Press Ctrl+Space again to see template proposals".

Pressing :kbd:`Ctrl+Space` cycles through the categories above.

.. toctree:: 

   content-assist-for-camelcase-and-underscore-common.rst
   code-templates.rst
   module-automatic-instantiation.rst
   override-functions.rst
   override-constraints.rst
   implement-extern-functions-using-autocomplete.rst
   use-assignment-pattern-for-struct-type-variable.rst
