editing:auto_completion:braces

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
editing:auto_completion:braces [2015/11/25 23:55] – [Rules] adminediting:auto_completion:braces [2018/03/23 13:05] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Auto Brackets ====== ====== Auto Brackets ======
  
-The name of the feature is actually misleadingand could be named as auto-braces or auto pair symbols. +The name of the feature is actually misleading and could be named as auto-braces or auto pair symbols. 
-But independently of name, functionality used for auto closing open symbol by closing symbol.\\ +But independently of the name, functionality used for an auto-closing open symbol by closing symbol.\\ 
-In addition, functionality is also responsible for deleting of pair symbols together; if close symbol is deleted and there is only white space between of both symbols.+In addition, functionality is also responsible for deleting of pair symbols together; if close symbol is deleted and there is only white space between of both symbols.
  
 ===== Rules ===== ===== Rules =====
 Here is the list of rules used: Here is the list of rules used:
-  * Editor does not do parsing for all previously open/close pair symbols. It will just add the closing one or remove both (both are only removed if the close symbol is deleted and there's nothing but white space between it and the open symbol)+  * Editor does not do the parsing for all previously open/close pair symbols. It will just add the closing one or remove both (both are only removed if the close symbol is deleted and there's nothing but white space between it and the open symbol)
   * For symmetric pairs (as “”) rules are more strict. You should have spaces (or delimiters) around   * For symmetric pairs (as “”) rules are more strict. You should have spaces (or delimiters) around
   * For asymmetric (as {}()[]), next char should be delimiter, otherwise close symbol will not be added   * For asymmetric (as {}()[]), next char should be delimiter, otherwise close symbol will not be added
   * Auto adding does not work in “text” styles (comments, strings)   * Auto adding does not work in “text” styles (comments, strings)
-  * If you type open + close symbol fast HippoEDIT will “eat” auto added. But if you do it after bigger delay, you would get “duplicated” close one. This is by design. Editor remembers only last auto closed pair, but not all of them.+  * If you type open + close symbol fast HippoEDIT will “eat” auto-added. But if you do it after bigger delay, you would get “duplicated” close one. This is by design. Editor remembers only last auto closed pair, but not all of them.
   * Editor executes adding of pair symbol action only after typing open symbol   * Editor executes adding of pair symbol action only after typing open symbol
-  * Deletes back of both pair symbols, if there is no other characters or white space between open/close symbols+  * Deletes back both pair symbols, if there is no other characters or white space between open/close symbols
   * There is similar function exists, that can be useful: [[options:formatting:smart-helpers|Surround Selection]]. If you select some text and then press any of open symbols, selection should be surrounded by open close symbol.   * There is similar function exists, that can be useful: [[options:formatting:smart-helpers|Surround Selection]]. If you select some text and then press any of open symbols, selection should be surrounded by open close symbol.
 +
 +<note tip>You can temporary disable Auto-Brackets feature for all syntaxes using [[editing:commands:toggle-smarties|Edit.ToggleSmarties]] command.</note>
  
 ==== Code Templates ==== ==== Code Templates ====
Line 26: Line 28:
  
 ===== Configuration ===== ===== Configuration =====
-Everything is based on symbol pairs defined in [[syntax:specification#OpenClose|OpenClose node]] of spec XMLs and can be modified by direct modification of this setting in schema file. +Everything is based on symbol pairs defined in [[syntax:specification#OpenClose|OpenClose node]] of spec XMLs of current syntax and can be modified by direct changing of this setting in schema file.