-
Notifications
You must be signed in to change notification settings - Fork 67
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
Simple text expander for "New Dweet" editor #391
base: master
Are you sure you want to change the base?
Conversation
As mentioned on discord, I think having fully automatic autocomplete might surprise people. If we're adding this feature I think it should be triggered by a keystroke, tab being the most obvious one. Can you make it into a tab-completion feature? You might have to change the behaviour slightly for that. For instance, x.f => x.fill, x.fillR => x.fillRect etc. This might be slightly misleading as people might expect a full tab completion for all the members (rather than hardcoded), but is still quite useful. That being said, dweets are very short already, so typing speed isn't really a major issue. What do other frequent dweeters think of this? |
First off I think this is a really cool workflow! And I can see it being very comfortable and efficient for someone who is well-acquainted with the system. I agree with the points that lionleaf raises, and think that having an autocomplete feature more akin to traditional IDEs could be pretty sweet. |
It is just a structure of a basic expander. If I have time, I will make it really advanced and more performant 😄 |
I set the expand key to |
The
This will cancel any selection every call of the function in the loop. The script is also newbie maked, just a prototype and concept. I am going to make a good one the next week. |
Simple text expander to make a dweet more easy.
hsl;
becomes`hsl(${},99%,50%)`;
hsla;
becomes`hsla(${},99%,50%,.5)`;
x.fs=
becomesx.fillStyle=
x.ss=
becomesx.strokeStyle=
x.fr
becomesx.fillRect(
x.bp;
becomesx.beginPath();
x.fl;
becomesx.fill();
x.sk;
becomesx.stroke();
x.sr
becomesx.strokeRect(
clear;
becomesc.width^=0;
middle;
becomesx.translate(960,540);
1time
becomest?0:event;
x.gcop=
becomesx.globalCompositeOperation=
x.dri
becomesx.drawImage(c,0,0)
m.ab
becomesMath.abs()
m.rn
becomesMath.random()
..rb
gives random choice between 1 and 0..for
becomesfor(i=0;i++<10;)
gr1
becomesα
gr2
becomesβ
gr3
becomesθ
gr4
becomesτ
gr5
becomesλ
;
becomes;
double space becomes
,
It really helped me. I created d/9685, d/9684, d/9683, d/9682, d/9681 using that script.
Improve the not working expands.