Simple text expander for "New Dweet" editor#391
Simple text expander for "New Dweet" editor#391imscary wants to merge 4 commits intolionleaf:masterfrom
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.frbecomesx.fillRect(x.bp;becomesx.beginPath();x.fl;becomesx.fill();x.sk;becomesx.stroke();x.srbecomesx.strokeRect(clear;becomesc.width^=0;middle;becomesx.translate(960,540);1timebecomest?0:event;x.gcop=becomesx.globalCompositeOperation=x.dribecomesx.drawImage(c,0,0)m.abbecomesMath.abs()m.rnbecomesMath.random()..rbgives random choice between 1 and 0..forbecomesfor(i=0;i++<10;)gr1becomesαgr2becomesβgr3becomesθgr4becomesτgr5becomesλ;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.