Search code examples
parametersautocompletesublimetext3sublimecodeintel

Bad autocompletion SublimeCodeIntel


I installed SublimeText3 recently. I installed the SublimeCodeIntel package for enable autocompletion for PHP. But, when I've a function with many parameters, it doesn't show the parameters correctly.

In the area with blue background, in "$ord...variaveis", a part of the parameter $ordenacao is hidden, like a part of the next parameter. The correct is to show "$ordenacao, $tipos_variaveis" instead of "$ord...variaveis". In functions with few parameters, all works fine. But in a function like this, with many parameters, this problem occur. Sorry for my bad english. Thanks in advance.


Solution

  • This is expected behavior. If the text on a line is too long to fit in the window, it is shortened by adding ... in the middle. As you can see, there is no way of making the window wider.

    From a general programming perspective, if you find yourself writing functions that require more than 3 or 4 arguments, you may be able to refactor the function into 2 or more separate ones, calling one from inside the other. Of course, this may not always be possible, but it is certainly something to consider.