Блог пользователя dukhi_insaan

Автор dukhi_insaan, история, 23 месяца назад, По-английски

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

Code

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

If-Else
#define

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) — > Enter

If-Else
  • Проголосовать: нравится
  • -10
  • Проголосовать: не нравится

»
23 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Try this snippet

if(($1) || ($2))
{
  if(($1) && ($2))
  {

  }
  else
  {
  	if($1)
  	{

  	}
  	else
  	{
  		
  	}
  }
}
else
{

}
  • »
    »
    23 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    where and how can I use tht?

  • »
    »
    23 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Wow Perfectly what am looking for,

    Thank You so much Master <3

    Problems am still facing :

    1. Works till $1 only.

    2. Available on sublime only not for Machine as software.

    Can you help me with these problems?

    For understanding of others how its working :

    snippet

    Add this snippet in your sublime and link with any trigger you want.

    It will automatically point Textfield cursor to every place where $1 was written.

    • »
      »
      »
      23 месяца назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      After entering the text for $1 press tab and it should move the selection to $2

      • »
        »
        »
        »
        23 месяца назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        "Ek hi to Dil hai Ivan Ji kitni baar jeetoge" it means in english "There is only one heart. How many times will you win? " <3

        Thank you so much bro

»
23 месяца назад, # |
Rev. 2   Проголосовать: нравится +11 Проголосовать: не нравится

you overcomplicated the code for ifel

you can just do this

Spoiler