Questions tagged [code-completion]

Refers to an IDE or editor feature that attempts to predict what you will type next based on context, speeding up code entry.

Code completion is a form of used by s or code oriented editors showing possible completions to a partially written code.

Common elements in many implementations:

  • Related keyboard shortcuts to simplify usage (invocation, choice selection)
  • Flexible configuration to:
    • Enable/disable the feature
    • Change response time
    • Associated shortcuts

Example: Netbeans guide has a Smart Code Completion section with pictures that show a common way used to implement this feature.

802 questions
363
votes
12 answers

Best way to define private methods for a class in Objective-C

I just started programming Objective-C and, having a background in Java, wonder how people writing Objective-C programs deal with private methods. I understand there may be several conventions and habits and think about this question as an…
Yurii Soldak
  • 1,458
  • 4
  • 19
  • 24
178
votes
21 answers

Visual Studio Code Intellisense is very slow - Is there anything I can do?

Edit: Pylance seems to be much better at this and has so far resolved all problems with the previous Python language server from Microsoft. I'm using VS Code and it's wonderful is all areas but code completion, where it is usually just too slow to…
175
votes
5 answers

How can I tell PyCharm what type a parameter is expected to be?

When it comes to constructors, and assignments, and method calls, the PyCharm IDE is pretty good at analyzing my source code and figuring out what type each variable should be. I like it when it's right, because it gives me good code-completion and…
Joe White
  • 94,807
  • 60
  • 220
  • 330
108
votes
2 answers

Faster code-completion with clang

I am investigating potential code-completion speedups while using clang's code-completion mechanism. The flow described below is what I found in rtags, by Anders Bakken. Translation units are parsed by a daemon monitoring files for changes. This is…
Pradhan
  • 16,391
  • 3
  • 44
  • 59
91
votes
3 answers

How does code completion work?

Lots of editors and IDEs have code completion. Some of them are very "intelligent" others are not really. I am interested in the more intelligent type. For example I have seen IDEs that only offer a function if it is a) available in the current…
stribika
  • 3,146
  • 2
  • 23
  • 21
72
votes
1 answer

Code snippets in PhpStorm

I use PhpStorm. I want to make snippets of code and then assign shortcuts to them. I can do it in NetBeans, but in PhpStorm I don't know how to make them. For example, to add console.log(); in NetBeans, I only type con + space. con is the shortcut…
Aladdin Mhemed
  • 3,817
  • 9
  • 41
  • 56
70
votes
3 answers

Vim's autocomplete is excruciatingly slow

Most of the time the autocomplete feature in Vim works nicely for me, but sometimes it seems to be scanning files which the current file references, and then it becomes painfully slow, sometimes taking several seconds to release focus back to…
jnicklas
  • 2,155
  • 2
  • 16
  • 14
49
votes
5 answers

Xcode 6.3 code completion too slow

I've just updated Xcode to version 6.3. I'm working on a project in Swift with some imported Objective C code. I also use Cocoapods. I had the same issue with the Xcode 6.3 beta. I've seen and tried all other StackOverflow answers with no luck. So…
MrTourkos
  • 1,922
  • 2
  • 18
  • 22
46
votes
5 answers

How to disable annoying 'parenthesis completion'?

Whenever I type a (, [, or {, Notepad++ completes it with the corresponding closing bracket. I find this 'feature' annoying and would like to disable it. It doesn't seem to be listed in the Preferences dialog and a search of the online documentation…
Sundar R
  • 13,776
  • 6
  • 49
  • 76
44
votes
5 answers

Spyder does not autocomplete local variables

I'm having a problem getting my local variables autocompleted. This is a very basic functionality which I'm sure it should support. When I'm starting to write a variable name which was already declared, and press TAB (this is the default shortcut),…
idoda
  • 6,248
  • 10
  • 39
  • 52
44
votes
10 answers

Xcode project CMD-Click on symbol to 'Jump to Definition' does not work

I've been using Xcode 4.3.1 since it came out now and I've worked on many different projects since. Everything has always worked fine until this new project I'm working on. The code completion/code sense never finds anything. When I 'Command+Click'…
rob1302
  • 1,631
  • 3
  • 15
  • 18
36
votes
1 answer

XCode 5: Is there any way to group/filter/sort what shows up in code-completion?

For a very simple object like this: @interface MyObject : NSObject @property(strong) NSObject* thingAboutMyObject; - (void) aThingToDo; - (void) moreToDo; - (void) yetAnotherAction; @end Someone working with MyObject gets code completion which…
J. Paulding
  • 494
  • 3
  • 9
35
votes
4 answers

IDEA: "Assign statement to new local variable"?

As a long time Eclipse user, I'm playing around a little bit with IntelliJ IDEA 10. I can't seem to find out how to perform an "Assign statement to new local variable" code completion. Feature explanation: I type something like new…
Chris Lercher
  • 37,264
  • 20
  • 99
  • 131
32
votes
5 answers

How to add documentation for my functions in Netbeans PHP?

I tried the following, /* * addRelationship * * Adds a relationship between two entities using the given relation type. * * @param fromKey the original entity * @param toKey the referring entity * @param relationTypeDesc the type of…
Raj
  • 22,346
  • 14
  • 99
  • 142
31
votes
6 answers

Android Studio basic auto completion shortcut not working

I have checked Preferences->Editor->Code completion. Basic code completion is turned on. Shortcut is ^Space. When I click [control]+[space], it is opening spotlight search instead of code completion. How to solve this problem?
Joe Rakhimov
  • 4,713
  • 9
  • 51
  • 109
1
2 3
53 54