Home Download Buy Blog Forum Support

Auto-complete is completing on any key press

Auto-complete is completing on any key press

Postby dwilliamson on Fri Jul 13, 2012 5:38 pm

Hi,

this is a similar problem to a previous post I made only it seems to be much worse now. Here's a video of what is happening: http://screencast.com/t/CMU7UrYmj

What I'm doing:

  • Press 'q' to reference the variable name.
  • Press '.' and the auto-complete pops up.
  • Press 'x' to type the member name, which also selects the member in the popup.
  • Press SPACE to continue typing. A new popup shows with all the members.
  • Press '*' to continue typing the equation, trying to ignore the popup.
  • Sublime auto-completes with the currently selected member, 'f'.
  • Backspace to delete what it's inserted.
  • Repeat ad-nauseam.

I have only SublimeClang installed with its fast completions disabled. All I want is for Sublime to stop auto-completing when I press any character.

Can anybody help here?

Cheers,
- Don
dwilliamson
 
Posts: 12
Joined: Thu Jan 26, 2012 10:39 am

Re: Auto-complete is completing on any key press

Postby C0D312 on Fri Jul 13, 2012 5:41 pm

I've noticed this too. I believe it's a bug with sublimeclang. Typing symbols seems to accept the completion.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Auto-complete is completing on any key press

Postby dwilliamson on Fri Jul 13, 2012 5:45 pm

I thought that too. However, the author of SublimeClang has stated that all his code does is populate the popup, as opposed to making it auto-complete: https://github.com/quarnster/SublimeCla ... nt-6901998
dwilliamson
 
Posts: 12
Joined: Thu Jan 26, 2012 10:39 am

Re: Auto-complete is completing on any key press

Postby dwilliamson on Fri Jul 13, 2012 5:50 pm

I've made my life infinitely better by removing this from SublimeClang's keymap:

Code: Select all
  {
    "command": "clang_complete",
    "args": {"characters": " "},
    "keys": [" "],
    "context": [ {"key": "clang_supported_language"}, {"key": "clang_is_code"}, {"key": "clang_complete_enabled"}, {"key": "clang_automatic_completion_popup"}]
  },


However, auto-complete still occurs when I press any key. For added context, the struct is:

Code: Select all
   struct quat
   {
      union
      {
         struct { float x, y, z, w; };
         float f[4];
      };
   };
dwilliamson
 
Posts: 12
Joined: Thu Jan 26, 2012 10:39 am

Re: Auto-complete is completing on any key press

Postby quarnster on Sat Jul 14, 2012 3:52 pm

Just to comment on this, while SublimeClang was responsible for inappropriately showing the autocompletion overlay (something that's now been fixed), it does not commit anything to the buffer. That behavior is built into Sublime Text 2 and is visible even in plain text files after reverting to a freshly installed state:

1. Open up a new buffer, with the plain text syntax definition.
2. Type the following:
Code: Select all
return
redrum

3. On the third line type "re"
4. Select the menu item "Edit"->"Show Completions". It should show a list with "return" and "redrum" showing.
5. Type "t" so that the third line reads "ret". Only "return" should be showing in the completions list now.
6. Type "*". It's completed to "return*".
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 19 guests