Sublime Forum

Autocomplete Behavior

#1

I’m having an issue with autocomplete when editing .less files (with syntax set to .css).

Autocomplete acts very aggressively, inserting text while I type without me hitting any trigger keys. The autocomplete menu flashes up and unless I hit escape first, pretty much any keypress will insert something.

I have recently installed SublimeCodeIntel (from the repo), and i think disabling it either solves the issue or mostly solves it, but I would like to keep it as it makes autocomplete much more useful for .php.
I’m only seeing this in .less files. I have not tried in .css, and am not seeing it in .php or .js.
I’m on OS X.

The behavior i’m expecting is that if the autocomplete menu is up, typing would narrow the list but not trigger completion (even if there is only one choice). Hitting tab would trigger the top choice.

Anyone have any ideas?
thank you

0 Likes

#2

How recently did you install SublimeCodeIntel? I made a few changes to it a couple days ago… Particularly for CSS files that had that very same problem. Please pull the latest from github.com/Kronuz/SublimeCodeIntel and let me know how it goes for you :smile:

0 Likes

#3

Check you’re using build 2076 or later, too.

0 Likes

#4

Hello

I just did a git pull on sublimeCodeIntel, and and it appears I was already up to date. Still experiencing this issue.

Some more details:
This is happening in .less (css syntax mode) and .css
An example of an unwanted complete. Typing “//” in whitespace will produce “/alignment-baseline: /” Typing “/[del]/” will produce “alignment-baseline: /”
Appearing in Build 2076 and Build 2082

0 Likes

#5

I can’t reproduce the problem locally… could you give me more information and when it presents itself?.. also provide info about the exact version you’re using and is it Windows? …Linux?

0 Likes

#6

Hello,

Thanks for looking at this, hopefully this will help clear up the behavior. In practice it is very aggressive auto-completing pretty much every time i type in a selector, constantly putting in things i don’t intend. For now i’ve quieted it by setting “codeintel_live”: false in my user file settings and by commenting out python_codeintel.py “if not live and text and sentinel[path] is not None: live = True”. But this isn’t a great long term solution.

Also, while i’m here, I wanted to say both ST and SCI are great, and i’m loving the combination for editing other types of files.

I’m on OS X 10.6.7
Running ST 2082 for this test
I just did a git pull (7/21 10:10 ET)
From git://github.com/Kronuz/SublimeCodeIntel 6340087…50df9c4 master

I relaunched ST, opened up a new project window, with no folders or files added, other than a file named “test.css”

With SublimeCodeIntel installed:
Type “body{//” , without hitting tab or any commands
Get “body{/alignment-baseline: /”

Type “body{background:”
Get “body{background-attachment: :;”

Quit ST, move SublimeCodeIntel out of packages, reopen:
Type “body{//” , without hitting tab or any commands
Get “body{//”

Type “body{background:”
Get “body{background:”

Thank you

0 Likes

#7

There are a few issues currently that are not possible to entirely fix at the moment… due the way ST2 does some things. One of them is autocomplete pops up even when undoing or deleting stuff, other is autocomplete inserts things when characters, being parts of words in certain languages (namely ‘-’, for example in CSS), are pressed… and they shouldn’t.

In time ST2 will get even better and better, and hopefully we’ll get to have a totally 100% working version of CodeIntel for it with all the bells and whistles a full fratured code intelligence engine can provide (tooltips and all)… In the mean time as a quick fix for just CSS files, you can disable SublimeCodeIntel just for a set of languages using the setting codeintel_disable_languages=‘CSS’]. But keep on checking at a later time to see if issues get gradually fixed :smile:

0 Likes