Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7982
    ToadLoadin
    Member

    The new snippet plugin is really powerful, after reading instructions in the help file, I guess it can do many productive things beyond my imagination.

    What I want to do is making an expandable comment banner like below, I guess it can be done with regular expression to transform text in a placeholder, but I’m an absolute beginner in writing regular expression…

    After a little bit of quick-start lesson, I wrote a short regex, aimed for replacing all characters in a string into “=”, which works fine in an online regex tester.

    But when I put my regex into a snippets, it behaves totally different, would somebody give me a hand? :-)

    #10108
    ldm
    Participant

    ToadLoadin, have you completed this snippet? Wanna to share?

    #10110
    zhouzh2
    Participant

    // ==${1/./=/g}==
    // = ${1:Banner} =
    // ==${1/./=/g}==
    $0

    #10111
    ToadLoadin
    Member

    Here it is. :-)

    `# Interface.write( document.Config.Highlight.LineComment1 );`==${1/.+?/=/g}==
    `# Interface.write( document.Config.Highlight.LineComment1 );`= ${1:Your comment goes here.} =
    `# Interface.write( document.Config.Highlight.LineComment1 );`==${1/.+?/=/g}==
    $0
    #10112
    ldm
    Participant

    Thanks!

    #10113
    ldm
    Participant

    ToadLoadin,

    How did you do so amazing animation in your post on the thread?

    Wanna share as well? :-)

    Thank you!

    #10114
    ToadLoadin
    Member

    It’s just some animated gif images, stored in my Dropbox cloud space.

    You can record your action via many screen record software, free ones like AutoScreenRecorder is fine, commercial ones like Camtasia studio is better, but expensive.

    After saving my screencast as avi file, I convert it to animated gif image via Format Factory.

    Then, put gif image in the “Public” folder of your Dropbox, right click and you will get the direct link which you could use in the forum.

    Because of my poor English, I use these animated screencasts to help me explain ideas or problems. :-P

    #10115
    ldm
    Participant

    Thank you ToadLoadin! Your English is just fine! :-) But you are right – one picture is better than 1000 words :-)

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.