Sim
Sim

Reputation: 4185

How does Geany auto-completion wơrk?

About the auto-complete features of Geany:

Upvotes: 20

Views: 63150

Answers (6)

HongboZhu
HongboZhu

Reputation: 4532

You can simply use Ctrl + Space.

Upvotes: 23

gavenkoa
gavenkoa

Reputation: 48743

Geany uses its own internal engine and is currently limited to:

Its file format uses three types of encoding:

  • Tagmanager format
  • Pipe-separated format
  • Ctags format

With Ctags, you can use the external and powerful ctags utility that supports a lot of languages.

Refer to the official documentation, Symbols and tags files.

Upvotes: 8

Amin Adel
Amin Adel

Reputation: 1028

The correct answer is:

Menu EditPreferencesEditorCompletions → check the "Autocomplete all words in document" checkbox. Press Ctrl + Space.

Upvotes: 16

MIRMIX
MIRMIX

Reputation: 1080

Geany surely has autocomplete and can offer a list of possible completions for symbols defined in the tags and for all words in a document.

The autocompletion list for symbols is presented when the first few characters of the symbol are typed or when the complete word (Ctrl + Space) keybinding is pressed.

When the defined keybinding is typed and the Autocomplete all words in document preference is selected, then the autocompletion list will show all matching words previously mentioned in the document, if there aren't any matching symbols.

Enter image description here

Enter image description here

Autocompletion also can be based on specific words, like keywords, etc. For this, you can check AutoCompletion for my DSL keywords in Geany.

Upvotes: 4

solitone
solitone

Reputation: 69

As the manual states:

Upon opening, files of supported filetypes are parsed to extract the symbol information (aka "workspace symbols"). You can also have Geany automatically load external files containing the symbol information (aka "global tags files") upon startup, or manually using Tools --> Load Tags File.

Global tags files are used to provide symbols for autocompletion and calltips without having to open the source files containing these symbols. This is intended for library APIs, as the tags file only has to be updated when you upgrade the library.

Some global tags files are distributed with Geany and will be loaded automatically when the corresponding filetype is first used. Currently this includes global tags files for these languages: C, Pascal, PHP, HTML, LaTeX, Python

For other languages, like Java, you have to download a tag file from here (if available), and load it upon startup or manually.

Upvotes: 4

Noah Singer
Noah Singer

Reputation: 526

Geany does have autocomplete.

The main way autocomplete is used is by typing a long word, and by narrowing that list of autocomplete possibilities down. Let's say you type gtk_combo_box_. It will have a small list of different commands that match this description. Typing eTAB will narrow the search down to gtk_combo_box_entry_. Typing sENTER will then bring it to the proper to gtk_combo_entry_set_text_column. See the Geany manual.

Upvotes: 11

Related Questions