Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HBuilder blocks significantly reduce the amount of repetitive code effort


May 25, 2021 HBuilder


Table of contents


HBuilder blocks significantly reduce the amount of repetitive code effort

Enter H in the open getstart .html, as shown below

HBuilder blocks significantly reduce the amount of repetitive code effort

Then press 8 to automatically generate the basic code for HTML as shown below

HBuilder blocks significantly reduce the amount of repetitive code effort

What is a block of code?

Blocks of code are commonly used combinations of code, such as entering $in js, entering a carriage return, and automatically entering document.getElementById (id).

View and edit blocks of code You can select the appropriate blocks of code to view and edit in the tool-custom blocks. You can also modify and view the change icon in the lower right corner of the details in the Code Assistant that activates the block.

  • Block Activation Character Principle 1: The first letter of a continuous word. F or example: dg activates document.getElementById (""); v ariactivated var i=0; dn Activate display: none;

  • Block Activation Character Principle 2: The name tag is generally used for the entire HTML. For example, script, style, usually, tap up to 4 letters to match the required block of code, do not need to enter the full, such as sc return, st return, you can complete the script, style label input.

  • Block Activation Character Principle 3: The same tag, with multiple block outputs, is suffixed at the end. For example, meta output but metau output, metag the same.

  • Block Activation Character Principle 4: If the original syntax is more than 4 characters, the activator for the first word uses abbreviations for common syntax. For example, input button, abbreviated as inbutton, the same intext is the input box.

  • Block activation character principle 5: js of the keyword block, is to add a duplicate letter at the end of the keyword. F or example, if a direct knock prompts the if keyword, but if you return, an if block appears. S imilar have forr, withh and so on. Because of the long funtion letters, in order to speed up the input, take fun abbreviations, such as funn, output fusion code blocks, while funa and func, output anonymous functions and closures, respectively.