Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Live Autocomplete in Ace Editor #62

Open
anant-singh opened this issue Dec 15, 2014 · 4 comments
Open

Enable Live Autocomplete in Ace Editor #62

anant-singh opened this issue Dec 15, 2014 · 4 comments

Comments

@anant-singh
Copy link
Contributor

After enabling the live auto-complete feature in Ace editor through the documentation given here: https://github.com/ajaxorg/ace/wiki/How-to-enable-Autocomplete-in-the-Ace-editor , the auto-indenting feature creates unexpected results.

Note: Basic auto-complete will still work but live-autocomplete interferes with auto-indenting.

Enabling auto-complete in Ace is a pre-requisite to #22.

@angrave
Copy link
Contributor

angrave commented Dec 15, 2014

On 12/14/14 7:34 PM, Anant Kumar Singh wrote:

After enabling the live auto-complete feature in Ace editor through
the documentation given here:
https://github.com/ajaxorg/ace/wiki/How-to-enable-Autocomplete-in-the-Ace-editor
, the auto-indenting feature creates unexpected results.

Note: Basic auto-complete will still work but live-autocomplete
interferes with auto-indenting.


Reply to this email directly or view it on GitHub
#62.

  1. I would be suspicious of our new auto indent feature

e.g. I think it may also be interfering with copy-paste and multiple
undo. (at least it used to)

  1. by the way. please add a new bug (or report an ACE bug) for the
    following indent

if(0) { /* next line should be indented /
char
m= "this line is not indented"; // due to dumb indent parsing
}

my guess is that { and } are ignored if a comment token /* is in the
line somewhere.
Making the indenter a little less braindead in this corner case would be
nice.

Lawrence

@anant-singh
Copy link
Contributor Author

I think there is an inherent problem in using any live auto-feature or using the on 'change' event to trigger any change. Maybe why the multiple undo is failing is because the auto-indent may also be registering as a change.

Also, for every live features that we put in, it keeps switching the focus based on the random order of execution of event listeners, the reason why the suggestion drop drown for auto-complete loses focus almost instantly and disappears.

@neelabhg neelabhg changed the title Enabling Live Autocomplete in Ace Editor Enable Live Autocomplete in Ace Editor Dec 19, 2014
@neelabhg
Copy link
Member

Is simple keyboard-triggered auto-complete also having this problem? Or is this happening only with live auto-complete, in which suggestions automatically pop up as the user types?

In any case, it is beneficial to address the issue and enable both normal and live auto-complete. I think then we should provide the user with a settings option to enable live suggestions or not (some users like it, some find it annoying). What do you think?

@neelabhg
Copy link
Member

FYI, I created a new issue (#67) to follow-up on point 2 in @angrave's comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants