Code Monkey home page Code Monkey logo

autocomplete-plus's Introduction

Atom

Build status

Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement

Atom is a hackable text editor for the 21st century, built on Electron, and based on everything we love about our favorite editors. We designed it to be deeply customizable, but still approachable using the default configuration.

Atom

Atom Screenshot

Visit atom.io to learn more or visit the Atom forum.

Follow @AtomEditor on Twitter for important announcements.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Documentation

If you want to read about using Atom or developing packages in Atom, the Atom Flight Manual is free and available online. You can find the source to the manual in atom/flight-manual.atom.io.

The API reference for developing packages is also documented on Atom.io.

Installing

Prerequisites

macOS

Download the latest Atom release.

Atom will automatically update when a new release is available.

Windows

Download the latest Atom installer. AtomSetup.exe is 32-bit. For 64-bit systems, download AtomSetup-x64.exe.

Atom will automatically update when a new release is available.

You can also download atom-windows.zip (32-bit) or atom-x64-windows.zip (64-bit) from the releases page. The .zip version will not automatically update.

Using Chocolatey? Run cinst Atom to install the latest version of Atom.

Linux

Atom is only available for 64-bit Linux systems.

Configure your distribution's package manager to install and update Atom by following the Linux installation instructions in the Flight Manual. You will also find instructions on how to install Atom's official Linux packages without using a package repository, though you will not get automatic updates after installing Atom this way.

Archive extraction

An archive is available for people who don't want to install atom as root.

This version enables you to install multiple Atom versions in parallel. It has been built on Ubuntu 64-bit, but should be compatible with other Linux distributions.

  1. Install dependencies (on Ubuntu):
sudo apt install git libasound2 libcurl4 libgbm1 libgcrypt20 libgtk-3-0 libnotify4 libnss3 libglib2.0-bin xdg-utils libx11-xcb1 libxcb-dri3-0 libxss1 libxtst6 libxkbfile1
  1. Download atom-amd64.tar.gz from the Atom releases page.
  2. Run tar xf atom-amd64.tar.gz in the directory where you want to extract the Atom folder.
  3. Launch Atom using the installed atom command from the newly extracted directory.

The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases.

Building

Discussion

License

MIT

When using the Atom or other GitHub logos, be sure to follow the GitHub logo guidelines.

autocomplete-plus's People

Contributors

50wliu avatar abe33 avatar aerijo avatar as-cii avatar benogle avatar boykoalex avatar braver avatar damieng avatar jasonrudolph avatar jeancroy avatar joefitzgerald avatar kevinnathan avatar kevinsawicki avatar lee-dohm avatar leroix avatar maxbrunsfeld avatar mcolyer avatar mnquintana avatar nixel2007 avatar park9140 avatar pfitzseb avatar phyllisstein avatar rafeca avatar sadikovi avatar saschagehlich avatar simurai avatar smashwilson avatar tinloaf avatar vito avatar yongkangchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autocomplete-plus's Issues

Autocompleting multiple selections at once

When using d or manually selecting multiple instances of a symbol and autocompleting will append the entire autocompletion to the stubs of every selection but the last. For example:

<div cla>
...
<div cla>
...
<div cla>

selecting all of the 'cla' and typing 'clas', then tab completing to 'class' will result in

<div clasclass>
...
<div clasclass>
...
<div class>

Repeating special characters when "Live Completion" is enabled

When I type ` or ^ (for example) using the "Live Completion" mode enabled the following happens:

error

The character is repeated multiple times and the buffer is now in a buggy state. Using the package with live completion turned off works great though :).

Tested on version 0.7.0 and 0.8.0.

Laggy when indenting large selection

Steps to reproduce:

  1. With autocomlete-plus 0.14.0 as the only 3rd package installed.
  2. Using the markup in this gist https://gist.github.com/mcanas/10888195, paste the code into Atom
  3. Select All
  4. Click the Tab button

Indentation lags by 15-20 seconds.

Attaching a few views of the console timeline.

Without autocomplete-plus:
screen shot 2014-04-16 at 3 04 50 pm

With autocomplete-plus:
screen shot 2014-04-16 at 3 02 37 pm

Remove enter as default confirmation key

The tooltip with the suggestions shouldn't have an option selected by default.
Im using this with the "live completion" enabled, but because of the default selection I can't using in conjunction with emmet or even with my custom snippets. This happens because when I try to expand a snippet, most of the times there's a autocomplete suggestion that will expand instead.

Add priority stuff to suggestions

As propsed by @pjv, we should add some priority stuff to the suggestions:

  • matches from the current language syntax file
  • matches from snippets for the current language
  • matches from word list from the current file buffer

Uncaught TypeError: Cannot read property 'length' of undefined

When using my package 'git-plus' to save a commit message file, this gets thrown the first time core:save is triggered but saving will work the second time.

Stack trace:

Uncaught TypeError: Cannot read property 'length' of undefined    
  /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:154
module.exports.TextBuffer.lineLengthForRow     
  /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:154
module.exports.Editor.lineLengthForBufferRow  
  /Applications/Atom.app/Contents/Resources/app/src/editor.js:429
module.exports.FuzzyProvider.lastTypedWord 
  fuzzy-provider.coffee:104
module.exports.FuzzyProvider.addLastWordToList 
  fuzzy-provider.coffee:81
module.exports.FuzzyProvider.onChanged 
  fuzzy-provider.coffee:73
(anonymous function) 
  fuzzy-provider.coffee:1

The error only occurs when a new line isn't entered in the commit message.
It seems to me as if the newLine variable is true when it should be false because there is no \n or ' '

[React editor] Stopping text input after displaying autocompletion box

Hi, I'm trying your plugin but it's clearly not working as expected, on my install. When I type something, after one or two chars, the autocomplete box pops up, and if I keep typing it doesn't go away. The only way to close it is either hit Esc or select an autocomplete option with Up and Down and then hitting Enter.

Here are my current settings.

screen shot 2014-04-24 at 14 08 58

Thanks for your work!

getBufferRange Error

Window load time: 720ms /Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:18
2
Uncaught TypeError: Cannot call method 'getBufferRange' of undefined /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:99
23
Uncaught TypeError: Cannot call method 'getBufferRange' of undefined fuzzy-provider.coffee:95
Uncaught TypeError: Cannot call method 'getBufferRange' of undefined /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:99
Uncaught TypeError: Cannot call method 'getBufferRange' of undefined /Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:390

Not working for me, not sure why

I just installed this fresh after uninstalling. Quit Atom and re-opened, just to make sure. Menu with autocomplete suggestions never comes up. Something I need to do that I'm not seeing in the Readme?

Snippet completion / suggestions

It would be really helpful if snippets could be part of the completion list. Currently you have to esc from the suggested completions and then tab complete the snippet.

Optional Confirm Key

I have so many issues using this, as I am used to autocomplete-confirm with the ENTER key, instead of tab. Would love a way to configure this in the settings pane. Could this be added?

What about showing on delay?

Having it live seems to bothersome when I'm writing comments. What about turning it off when I'm writing comments, or only turn it on after a slight delay?

Suggestions contain words for wrong scope

Since we only generate the wordlist from time to time, it might contain suggestions for the wrong scope. Solution: Don't put scope words into the wordlist per default, just merge them with the wordlist every time we display suggestions.

Return Functionality Compromised

When editing a Markdown or Ruby, if I hit Return while the autocomplete box is open, it will enter a carriage return but not allow me to type anything else. I have to move to a new tab or Cmd-Tab out of the app and back in order to regain my control.

Using Korean input messes up atom

Hello,

when having autocomplete plus installed and switching to the Korean 2 set input, the editor goes crazy. A single character will result in a line of Korean characters, keyboard navigation is no longer working and mouse interaction neither.

The only way to recover from this state is to cmd+w the tab, discard changes and open again, this time with US layout.

Tested on 2 Macbooks running OS X 10.9.2.
Atom version 0.85.9

Korean layout used is the normal 2 set one that ships with OS X.

Appears to Conflict with Autosave

Running this with Autosave on causes the file to get repeated "This file has changed on disk" warnings, requiring a reload of the file.

Enter makes problem

Each time I use autocomplete, if I pressed Enter instead of Space.
The cursor is missing, and any typing will not work. Until I use Cmd+S save the file.

1

Configurable "Accept" Key

Other editors like Sublime Text allow you to disable "Accepting" a suggestion on enter. For example, I get to the end of a line, and hit enter to return to the next line, but there was a suggestion that gets accepted instead.

In ST when you disable accept on enter, if there is a suggestion when you hit enter, it just returns to the next line. This would be my preferred behavior.

Modify Provider / Suggestion API To Be Asynchronous

Curently, runAutocompletion is an synchronous API, calling each Provider in order for suggestions. It might be more appropriate to make this an asynchronous, event-driven API. This presents obvious challenges for aggregation of suggestions, but should discourage any misbehaving providers from blocking unnecessarily.

Save should dismiss suggestions

If there are suggestions present when I save the file, the suggestions should be dismissed. Save implies I'm already done. Thoughts?

Nice work btw. I was used to this feature in Sublime Text.

Move The Package Into Core / Upstream The Package

Would be really great if the provider API worked with both.

The worst thing that could happen is if the atom package implemented a different API. Then authors would have to either choose one, or support both. Neither of those is a great option.

I don't know how this is architected internally, and maybe its difficult to upstream as its currently written. But if that isn't the case, would be great.

Keyword auto completion

In ruby i am getting autocompletion on keywords like 'do'. The keyword is not in the suggestions list so you end up with something like 'double' instead

Ability to go fully case Sensitive?

Perhaps it's just me being use to the editor I came from before Atom but I would love to make autocomplete be 100% case sensitive. To me foo is completely different from Foo and when I type Fo I don't want to be presented with foo as an autocomplete option.

API

Other packages should be able to use the Autocomplete+ UI

Typing cmd+s or trying to save a file, opens the dev tools with an exception

How to reproduce:

open a folder with atom, with some files inside
open a file in the editor
hit cmd+k and an arrow to make a split panel
hit cmd+w to close the new panel
now whenever you hit cmd+s to save, you get the dev tools with the below error

Uncaught TypeError: Cannot call method 'getBufferPosition' of undefined 

screen shot 2014-03-19 at 13 46 32

If I disable the plugin, save behaves normally and I don't get the dev tools.

Case sensitivity bugs

It seems that once you've finished a "word", it gets removed from the list of candidates. But then what happens is if you hit "tab", what you've typed will get completely replaced with a very different word.

Here's an example in Java, with the words thread and Thread. When you start typing say the first few characters of thread, the primary suggested match is thread as expected, but when I type the last letter (d), it suddenly changes to Thread. Exact opposite thing happens when typing Thread.

image

image

Also in general, I think matching case should take higher priority for selecting the first match, or at least there should be an option. In this example, I think downloadThread should be the main suggestion instead of DownloadTask.
image

Closing tab with Autosave causes JavaScript error and Inspector to open

Steps to reproduce:

  1. Enable the default atom/autosave package
  2. Open an existing JavaScript file or CoffeeScript file
  3. Click the close tab X icon or press cmd+w
  4. Inspector opens with the following error message Uncaught TypeError: Cannot call method 'getBufferPosition' of undefined /Applications/Atom.app/Contents/Resources/app/src/editor.js:1246

It seems that it's trying to get the caret position for autocomplete on the file that was just saved and closed.

Laggy moving cursor in large files when autosave is enabled

This could be related to #13.

Steps to reproduce:

  1. Open System Preferences, click Keyboard and set Key Repeat to the highest setting (Fast)
  2. Enable the default atom/autosave package
  3. Open an existing large JavaScript file e.g. over 100 lines (say backbone.js)
  4. Press & hold the down arrow and notice how laggy the cursor moves between lines (same with up arrow). CPU usage also spikes with the Atom Helper process jumping to around 99% usage, while the down arrow is being pressed.

Note when autosave is disabled cursor moves with less lag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.