Autocomplete on functions in same file

Hello all,

Trying out version 8.5.4, looking for a vim/sublime text replacement while editing Perl code.

One of my most important criteria is autocomplete/intellisence/whatever you want to call it, since I work with large libraries, etc.

First off: komodo edit works extremely well with autocomplete (ie, drop-down selection) on member functions when I use:

use Class::Name;

my $c = Class::Name->new;    # autocomplete/drop-down for new...!

$c->memberFunc;  # autocomplete/drop-down for memberFunc/others!!

Off the bat, that solves most of my problems.

However, this feature does not seem to work for variables and functions in the same file:

my $varThis = 1;
our $varThat = 2;
        
sub thisFunc1 {
}
            
sub thisFunc2 {
}
        
sub thisThash1 {
}
        
sub thatFunc1 {
}
        
thisFunc1();  # does not autocomplete!  Have to use ctrl-space...
my $v = $varThis; # does not autocomplete!  Have to use ctrl-space...

So, is there a way to make this editor perfect by having it behave consistently with variables and functions in the same file?

Thanks

Can you try to use Ctrl+J to show completions popup?

Hi Defman,

Ctrl+J results in a message in the status bar, and no completions popup:

“No preceding trigger point within range of current position”

The file type is correctly identified as Perl - visible at bottom-right in the status bar.

Interestingly, PHP autocompletion/popup (albeit only after using Ctrl+J) works correctly, but not for Perl source.

So, related to my original question, for PHP (and eventually/hopefully Perl as well), is there a way to “switch on” Ctrl-J permanently?

Either way, Ctrl-J/autocompletion-popup does not work on variables/functions defined in the same file for Perl in komodo.

Anything else I can do to help diagnose this issue? …or is that expected behaviour for the komodo editor?

Thanks

Hey @henryq,

The Perl issue is a bug and I"m seeing it as well, it is not expected behavior. That would be a very…poor code intel implementation. I’ve reported it here: https://bugs.activestate.com/show_bug.cgi?id=105007 Please feel free to comment there.

By default “Crtl + J” is “on”. The Code Intel dialog triggers after you’ve typed 3 characters. You mention PHP so can you confirm that even in PHP files, you are not getting completions dialog after typing 3 characters?
Note Python triggers after 2 but that’s not really relevant here…just an FYI.

Out of curiosity, do you get completions in Perl files after typing "use "? Note the space after “use”.

  • Carey

Cool, good to know. Any idea when it will be fixed?

Where can I change that to 2 or even 1?

[quote]You mention PHP so can you confirm that even in PHP files, you are not getting completions dialog after typing 3 characters? Note Python triggers after 2 but that’s not really relevant here…just an FYI.
[/quote]

PHP autocompletion works fine with variables/functions in same file/view.

Yes, that works correctly:

use Class::With::A::Long::Name;

Autocompletes/suggests on each delimited word (following the folder structure on disk), which is great.

…and here I was laboring under the weird impression Activestate was a Perl-centric (even if at first), organization. :wink:

When will it be fixed? This will probably go into a nightly release. I won’t comment on when that will be but…soon…ish. I highly recommend commenting on the bug report, not this forum post. The devs will not see the forum post when looking at or working on the bug.

You’re more than welcome to modify Code Intel to yourself. Have a look at Komodo Edit Github. When @toddw is back from vacation or @mook has time you can also ask them question. The devs love to help.

  • Carey

yay! variable completion now works with latest nightly build…

Thanks Todd Whiteman!

Just waiting for function completion… :wink: