# Electrics - automatic typing by Alpha

The term "electric" is used in the sense of "automatic, power assisted behavior", which is intended to save time, keystrokes, and brainpower. All the "electric" features are features, which makes Alpha do automatic typing for you. HTML modes electric preferences are set using General in the Preferences submenu of the HTML menu.

Electric braces
Enabling Electric braces tells Alpha to treat the left or right brace '{', '}' keys as special keypresses which enter the '{' or '}' character, followed by a carriage return and then indent the following line correctly. In HTML mode the braces are only electric inside SCRIPT and STYLE elements. Outside SCRIPT and STYLE elements typing '{' or '}' simply inserts a '{' or a '}'. Note! For the electric braces to work you must select your keyboard in the dialog Config -> Preferences -> System Preferences -> International.
Electric semicolon
Enabling Electric semicolon tells Alpha to treat the semicolon key ';' as special keypresses which enters the ';' character followed by a carriage return and then indents the following line correctly. The ';' key is context-dependent so you can still enter a for( ; ; ) loop in JavaScript code without Alpha messing things up. In HTML mode the semicolon is only electric inside SCRIPT and STYLE elements. Outside SCRIPT and STYLE elements typing ';' simply inserts a ';'.
Indent on return
Enabling Indent on return tells Alpha to indent the following line automatically whenever you press return.
Auto-indent when typing > of a tag
Enabling this feature will tell Alpha to indent the current line when you type the > of a HTML tag at the beginning of a line. This will make sure that the code is correctly indented when you simply type the code without using the menu items for HTML elements.

Previous page Next page