Wiki
Version 5 (modified by nerdzero, 5 years ago)

Indicate that autocompletion is somewhat supported in MD/XS

The Cobra add-in for MonoDevelop or Xamarin Studio provides some amount of support for code completion. Consult the README file provided with the add-in to see what is and what is not working. Better support for autocompletion in MonoDevelop is currently under active development.

Other IDEs, such as Visual Studio, do not yet support autocompletion (aka Intellisense) for Cobra. There are some mitigators to help you out:

  1. Compiler suggestions: The Cobra compiler will make suggestions for unknown members. This comes in handy if you know a few characters of the member in question. For example, the code someString.tri will yield:
    error: Cannot find a definition for "tri" in "someString" whose type is "String".
    There are members with similar names including ".substring", ".toString",
    ".trim", ".trimEnd" and ".trimStart".
    
  1. @help directive: Within your Cobra code you can prefix an expression such as a type name, variable or method call with @help which will cause the Cobra compiler to generate an .html help file including type information and convenient search links:
    @help String
    t = [1, 2, 3]
    @help t  # will create a help file showing the interface to List<of int>
    
  1. Native autocomplete: Some editors such as UltraEdit? on Windows, TextMate on Mac, or Vim on Linux provide autocompletion based on words found in the file. While this doesn't help with discovery, it can reduce typing when variables, types, and methods are reused. Other editors such as gedit can support this through a plug-in.

Cobra is a community-driven open source project. If you would like to help with autocomplete support, speak up on the discussion forum.

See also: IDESupport, EditorSupport, HelpWanted