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

Add a way to disable autocompleted elements #100

Open
alopepeo opened this issue Oct 13, 2012 · 1 comment
Open

Add a way to disable autocompleted elements #100

alopepeo opened this issue Oct 13, 2012 · 1 comment
Assignees
Labels
Milestone

Comments

@alopepeo
Copy link
Contributor

I've receibed some questions about disable the autocomplete feature for certain elements (or just for all).

For example, there are some users that uses the comments for invalide some parts of the css, and every time you write the /* it autocompletes to */ and you have to delete the autocompleted part and move it to the place you want.

#something {
     the user: wants to keep this part;
     and: invalide this part;
}

He writes the start of a comment and it's autocompleted:

#something {
     the user: wants to keep this part;
     /**/and: invalide this part;
}

You have to delete the last part and place it to the end of line:

#something {
     the user: wants to keep this part;
     /*and: invalide this part;*/
}

Otherwise, if it's more easy to you (and more convenient to the users), you can detect when the user is positioned in a blank space and let the last part is completed, or, if the cursor is behind a line, autocomplete it at the end of the line:

The user writes the start comment:

#something {
     the user: wants to keep this part;
     /*and: invalide this part;
}

and it is autocompleted to the end of the line:

#something {
     the user: wants to keep this part;
     /*and: invalide this part;*/
}

Other posible user action is invalide more larger parts of the css, and for that, the autocomplete feature would be disabled. You should have to detect when the user is positioned at the start of an element:

The user starts a comment in the beginning of an element and nothing should happend:

#the.user.wants.to.keep.this {
     something: here;
}

/*#but.no.this {
     something: here;
}

#and.neither.this {
     something: here;
}

Now, he can place the end of the comment where he wants:

#the.user.wants.to.keep.this {
     something: here;
}

/*#but.no.this {
     something: here;
}

#and.neither.this {
     something: here;
}*/

Other thing, is the position of the "}" bracket in the new auto indent feature. Drugoy says that he hates to scrool to much, and I understant it, but for the users that uses the } bracket in a single line would be great if you can add a "Write and Learn functionality". This would work something like this:

The user starts a bracket and it's autocompleted:

#something {|}

Press enter and the cursor is auto indent:

#something {
    |}

If he doesn't like this coding style, you can build your own code and, once completed, right cick to the start of an element to the last bracket and select "Use this coding style for brackets".

This is the finished coding style that you can select with right click and USM would learn about it:

#something {
    |
}

After that, the coding style would work every time you start a bracket and it's autocompleted.

I don't know if it's possible. I think that it would be a great solution for multiple coding styles. For me, it's much more comfortable the second coding style that I show you, I don't mind if uses much space.

If disable the autocomplete of brackets and comments results more easy to you, it also would be useful.

Anyway, I know you have a lot of work, so, if you want to keep this issue freezed for another version later than 1.1, there isn't problem.

@ghost ghost assigned grssam Oct 13, 2012
@alopepeo
Copy link
Contributor Author

I think this is more an enhacement than a bug. I name it like an issue at the end because that's how Github names every topic.

grssam added a commit that referenced this issue Oct 18, 2012
Disable comment auto completing when there is text just after the
starting of comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants