is there any software for dynamic code snippets? 
Difference between en1 and en2, changed 19 character(s)
Hello Guys,↵

I am working on how can I speed up the way to write code. We all are used trigger based snippet pasting.↵

Example : dsu — > Enter↵

<spoiler summary="Code">↵
~~~~~↵
ll parent[200000 + 10], siz[200000 + 10];↵

ll findParent(ll i)↵
{↵
    if (i == parent[i])↵
        return i;↵
     ↵
     parent[i] = findParent(parent[i]);↵
      return parent[i];↵
}↵

void unionNodes(ll a, ll b)↵
{↵
    ll parent_a = findParent(a), parent_b = findParent(b);↵
    if (parent_a == parent_b)↵
        return;↵
    if (siz[parent_a] >= siz[parent_b]) {↵
        swap(parent_a, parent_b);↵
    }↵
    siz[parent_b] += siz[parent_a];↵
    parent[parent_a] = parent_b;↵
}↵

void cleardsu(ll n) {↵
    for (ll i = 0; i <= n; i++) {↵
        parent[i] = i;↵
        siz[i] = 1;↵
    }↵
}↵

~~~~~↵
</spoiler>↵

In a same way we also use if-else conditions or sometimes we want to change our #define template during the contest,↵

<spoiler summary="If-Else">↵

~~~~~↵

if(something1 || something2)↵
{↵
  if(something1 && something2)↵
  {↵

  }↵
  else↵
  {↵
   if(something1)↵
   {↵

   }↵
   else↵
   {↵
   ↵
   }↵
  }↵
}↵
else↵
{↵

}↵

//idk comment if you know any easy way to handle this↵
~~~~~↵

</spoiler>↵

<spoiler summary="#define">↵

~~~~~↵

#define fo(a,b) for(int i=a;i<b;i++)↵

for(int i=0;i<b && j<something;i++)↵

//what if we get directly for loop printed instead of #define so we can edit it later↵
~~~~~↵

</spoiler>↵

Free Tools I found till now (Windows): ↵


  1.
AutoText (https://www.jitbit.com/autotext/) //I know there is already function on Sublime for it but sometimes we code on online platforms (LeetCode) so it would be helpful there.↵


  2.
Magical and other Text Expander they are for only chrome not Machine↵

I am just asking for If anyone knows any software which can we make dynamic code snippets or somneone could make Sublime extention for it so it would be helpful for all of us.↵

What I want : ↵

Trigger : ifel(something1,something2) &mdash; > Enter↵

<spoiler summary="If-Else">↵

~~~~~↵

if(something1 || something2)↵
{↵
  if(something1 && something2)↵
  {↵

  }↵
  else↵
  {↵
   if(something1)↵
   {↵

   }↵
   else↵
   {↵
   ↵
   }↵
  }↵
}↵
else↵
{↵

}↵

~~~~~↵

</spoiler>↵

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English dukhi_insaan 2022-05-16 08:38:01 19
en1 English dukhi_insaan 2022-05-16 08:35:19 2294 Initial revision (published)