-
-
Notifications
You must be signed in to change notification settings - Fork 34
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 code snippets #6
Comments
The reason I like to use yas is that you can use code and conditions in the snippets. This way, if the user wants to code with type hints, the snippets could have optional type hints. Also, you can easily have things like creating a setter and/or a getter function along with a variable. |
Some snippet ideas:
|
and also estructures like an if, if-else, if-elif-else, while, for etc... That would be great! |
@PinyaColada An |
The simpler statements aren't too useful, yes. Maybe they can be there for the sake of providing a consistent experience. The if template is a little too basic but as you can autocomplete all snippets as you type with yas, if you know you have all basic keywords supported, you can type quite a bit of code using the same keyboard shortcuts. Although I don't know how you'd make if/else and if/elif/else work efficiently as one snippet. I'd rather have one for each, so you insert if, elif, or else lines as needed. |
1 similar comment
The simpler statements aren't too useful, yes. Maybe they can be there for the sake of providing a consistent experience. The if template is a little too basic but as you can autocomplete all snippets as you type with yas, if you know you have all basic keywords supported, you can type quite a bit of code using the same keyboard shortcuts. Although I don't know how you'd make if/else and if/elif/else work efficiently as one snippet. I'd rather have one for each, so you insert if, elif, or else lines as needed. |
Also I'd prefer yasnippet after spending some time with it, because it supports much more stuff than alternatives. For instance, we can optionally include type hints in snippets. |
I thought maybe use the yasnippet-snippets package and submit spnippet in |
That'd probably be the way to go! Feel free to close this. |
Currently, the requirements listed above are not fully supported, so they will not be closed . ❤️ |
Add code snippets or skeletons for GDScript.
I use yasnippet, that's really powerful, but should snippets for this package be included here? Split to another package?
Should I use the emacs skeletons? Abbreviations? Both? As these features are included in Emacs itself.
Feedback is welcome!
The text was updated successfully, but these errors were encountered: