You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • During testing, Terminal window is often used to send same commands.
    Typing same thing again and again is boring.
    Snippets could be one way to help, but working with several projects blows up snippets.
    I would prefer to save testing commands in project file, to have them available whenever comin back to project.
    Therfore just tested, how we could send selected lines from code window.
    Short extension to js/core/send.js(line 47) like this could help.
    It first checks for selected lines in code window, and sends this code only.
    If nothing is selected it sends whole project.
    I'm not fully satisfied with this solution.
    It would be a change for send button, any idea to do better ?

      var code = Espruino.Core.EditorJavaScript.getSelect­edCode();
      if(code.length > 0) 
            Espruino.Core.Serial.write(code,true);
      else
             Espruino.Core.Code.getEspruinoCode(Espru­ino.Core.CodeWriter.writeToEspruino);
    
    
About

Avatar for JumJum @JumJum started