0

I mean to get completion of variable names, function names, function argument names, and keywords in Octave, similarly as in Eclipse CDT, e.g. This works in the Command window, but not in the Editor, where only keywords and functions can be completed.

Official documentation indicates <Tab> and <M-?> should work. If I press <Tab> I get a Tab character inserted. And I do not know which is the Modifier key. Plus, I have a Spanish keyboard, so the question mark is obtained with <Shift>+', so I am not sure how will it work if I find the correct M key.

How can I enable it for the Editor?

Notes:

  1. Help -> About shows

    GNU Octave, version 4.4.1... configured for "x86_64-w64-mingw32"...

    Using Octave portable under Win 10.

  2. I found files <octave-dir>\etc\inputrc.default and <octave-dir>\share\octave\4.4.1\m\startup\inputrc

  3. There is a file C:\Users\user1\.config\octave\qt-settings containing

    ...
    [editor]
    ...
    codeCompletion=true
    ...
    codeCompletion_threshold=2
    codeCompletion_keywords=true
    codeCompletion_octave_builtins=true
    codeCompletion_octave_functions=true
    codeCompletion_document=false
    codeCompletion_case=true
    codeCompletion_replace=false
    ...
    tab_indents_line=false
    
  4. This refers to the speed of readline for Octave under Win. I have speed issues with readline of my Portable Msys2 under Win 10, but this is a different issue.

2 Answers2

1

On the top of the editor widget, select Edit > Preferences. Select the Editor tab. Look for Auto Completion. Select Match words in document.

loved.by.Jesus
  • 2,266
  • 28
  • 34
0

There are essentially no references that mention completion specifically in the editor. The only one I found, from 2014, stating that:

There is no editor completion on all known function names, nor on parameter lists of known functions. There is an open bug report requesting function name completion in the editor, see http://savannah.gnu.org/bugs/?41371.

The GUI is an experimental new feature in the 3.8 release, please consider helping to improve it for 4.0 by joining the maintainers mailing list or participating on the bug tracker (even submitting feature request bugs if you want).

So at that time it was not available.