Convert Figma logo to code with AI

auto-complete logoauto-complete

Emacs auto-complete package

1,722
287
1,722
99

Top Related Projects

typeahead.js is a fast and fully-featured autocomplete library

Ajax Autocomplete for jQuery allows you to easily create autocomplete/autosuggest boxes for text input fields

Simple autocomplete pure vanilla Javascript library.

Ultra lightweight, usable, beautiful autocomplete with zero dependencies.

Quick Overview

Auto-Complete is a jQuery plugin that provides suggestions while you type into the field. It's designed to be flexible and customizable, allowing developers to easily integrate autocomplete functionality into their web applications. The plugin supports local and remote data sources, making it versatile for various use cases.

Pros

  • Easy to implement and integrate with existing jQuery projects
  • Highly customizable with numerous configuration options
  • Supports both local and remote data sources
  • Lightweight and performant

Cons

  • Requires jQuery, which may not be ideal for modern web applications
  • Limited built-in styling options, requiring additional CSS for advanced designs
  • May not be the best choice for large datasets or complex autocomplete scenarios
  • Lacks some advanced features found in more modern autocomplete libraries

Code Examples

  1. Basic usage with local data:
$('#autocomplete-input').autocomplete({
    source: ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry']
});
  1. Using a remote data source:
$('#autocomplete-input').autocomplete({
    source: 'https://api.example.com/search',
    minLength: 2
});
  1. Custom rendering of suggestions:
$('#autocomplete-input').autocomplete({
    source: ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry'],
    renderItem: function(item) {
        return $('<div>').text(item.label).append($('<span>').text(' (' + item.value + ')'));
    }
});

Getting Started

  1. Include jQuery and the Auto-Complete plugin in your HTML:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="path/to/jquery.autocomplete.min.js"></script>
<link rel="stylesheet" href="path/to/jquery.autocomplete.css">
  1. Create an input field and initialize the autocomplete:
<input type="text" id="autocomplete-input">

<script>
$(document).ready(function() {
    $('#autocomplete-input').autocomplete({
        source: ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry'],
        minLength: 1
    });
});
</script>

This will create a basic autocomplete input field with suggestions from the provided array. Adjust the options as needed for your specific use case.

Competitor Comparisons

typeahead.js is a fast and fully-featured autocomplete library

Pros of typeahead.js

  • More robust and feature-rich, offering advanced functionality like remote data fetching and custom templates
  • Better performance with large datasets due to its efficient data management and caching mechanisms
  • Actively maintained with regular updates and a larger community

Cons of typeahead.js

  • Steeper learning curve due to its more complex API and configuration options
  • Heavier file size, which may impact page load times for smaller projects
  • Requires jQuery as a dependency, which may not be ideal for all projects

Code Comparison

typeahead.js:

$('#search-input').typeahead({
  hint: true,
  highlight: true,
  minLength: 1
},
{
  name: 'states',
  source: substringMatcher(states)
});

auto-complete:

new autoComplete({
  selector: "#search-input",
  data: {
    src: states,
    cache: true
  },
  resultsList: {
    element: (list, data) => {
      if (!data.results.length) {
        const message = document.createElement("div");
        message.setAttribute("class", "no_result");
        message.innerHTML = `<span>Found No Results for "${data.query}"</span>`;
        list.prepend(message);
      }
    },
    noResults: true
  }
});

Both libraries provide autocomplete functionality, but typeahead.js offers more built-in features and customization options, while auto-complete focuses on simplicity and ease of use. The choice between them depends on project requirements and complexity.

Ajax Autocomplete for jQuery allows you to easily create autocomplete/autosuggest boxes for text input fields

Pros of jQuery-Autocomplete

  • Lightweight and easy to integrate with jQuery-based projects
  • Supports custom data formatting and multiple data sources
  • Offers more customization options for appearance and behavior

Cons of jQuery-Autocomplete

  • Requires jQuery as a dependency, which may not be ideal for all projects
  • Less frequently updated compared to auto-complete
  • May have performance issues with large datasets

Code Comparison

jQuery-Autocomplete:

$('#autocomplete').autocomplete({
    serviceUrl: '/api/suggestions',
    onSelect: function (suggestion) {
        console.log('Selected: ' + suggestion.value);
    }
});

auto-complete:

new autoComplete({
    selector: "#autocomplete",
    data: {
        src: async () => {
            const source = await fetch("/api/suggestions");
            return await source.json();
        },
        key: ["name"],
        cache: true
    },
    onSelection: (feedback) => {
        console.log('Selected: ' + feedback.selection.value);
    }
});

Both libraries offer similar functionality, but auto-complete provides a more modern approach with built-in async support and doesn't require jQuery. jQuery-Autocomplete may be easier to implement for developers already using jQuery, while auto-complete offers a more flexible and standalone solution.

Simple autocomplete pure vanilla Javascript library.

Pros of autoComplete.js

  • More modern and actively maintained (last update in 2023)
  • Supports multiple data sources including APIs and JSON
  • Highly customizable with extensive configuration options

Cons of autoComplete.js

  • Larger file size (around 40KB minified)
  • Steeper learning curve due to more complex API
  • May be overkill for simple autocomplete needs

Code Comparison

autoComplete.js:

const autoCompleteJS = new autoComplete({
  selector: "#autoComplete",
  data: {
    src: ["Apple", "Banana", "Cherry"],
    cache: true,
  },
  resultsList: {
    element: (list, data) => {
      if (!data.results.length) {
        const message = document.createElement("div");
        message.setAttribute("class", "no_result");
        message.innerHTML = `<span>Found No Results for "${data.query}"</span>`;
        list.prepend(message);
      }
    },
    noResults: true,
  },
});

auto-complete:

var fruits = ['Apple', 'Banana', 'Cherry'];
new autoComplete({
  selector: 'input[name="fruit"]',
  minChars: 1,
  source: function(term, suggest){
    term = term.toLowerCase();
    var matches = fruits.filter(fruit => fruit.toLowerCase().includes(term));
    suggest(matches);
  }
});

autoComplete.js offers more built-in features and customization options, while auto-complete provides a simpler API for basic autocomplete functionality. The choice between them depends on the specific requirements of your project and the level of complexity you need.

Ultra lightweight, usable, beautiful autocomplete with zero dependencies.

Pros of Awesomplete

  • Lightweight and dependency-free, with a smaller file size
  • Easier to set up and use, requiring minimal configuration
  • Better accessibility features out of the box

Cons of Awesomplete

  • Less customizable and fewer advanced features
  • Limited styling options compared to Auto-Complete
  • Smaller community and fewer updates

Code Comparison

Awesomplete:

var input = document.getElementById("myinput");
new Awesomplete(input, {
    list: ["Ada", "Java", "JavaScript", "Brainfuck", "LOLCODE", "Node.js", "Ruby on Rails"]
});

Auto-Complete:

$('#myinput').autocomplete({
    source: ["Ada", "Java", "JavaScript", "Brainfuck", "LOLCODE", "Node.js", "Ruby on Rails"],
    minLength: 2,
    delay: 300
});

Both libraries provide simple ways to create autocomplete functionality, but Awesomplete's implementation is more straightforward and doesn't require jQuery. Auto-Complete offers more configuration options, such as minLength and delay, which can be useful for fine-tuning the autocomplete behavior.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Looking for new maintainer

auto-complete, popup-el and fuzzy-el are looking for new maintainers. If you are interested, then please comment on this issue.

License: GPL v3 MELPA MELPA Stable

Auto-Complete

CI

An Intelligent auto-completion extension for Emacs

What is Auto-Complete?

Auto-Complete is an intelligent auto-completion extension for Emacs. It extends the standard Emacs completion interface and provides an environment that allows users to concentrate more on their own work.

🏆 Features

  • Visual interface
  • Reduce overhead of completion by using statistic method
  • Extensibility

Screenshots

Auto CompletionFuzzy CompletionIncreamental Search

Install

auto-complete is available on MELPA and MELPA-STABLE

You can install auto-complete with the following command.

M-x package-install [RET] auto-complete [RET]

User Manual

Auto-Complete User Manual

Basic Configuration

(ac-config-default)

Development

Reporting Bugs

Visit Auto-Complete Issue Tracker and create a new issue.

Todo

  • etags, ctags
  • emacswiki
  • test facility
  • support composed chars
  • minibuffer completion
  • performance issue (cache issue)
  • asynchronous processing
  • kanji henkan support
  • create menu if needed
  • quick help positioning on tabs (bug)
  • skip short completion

License

This software is distributed under the term of GPLv3.