Manual
3. Customization
This chapter describes the differents parameters and functions that you can change to customize Smarty Mode.
To do that, open a Smarty file, click on the Smarty menu and choose Options
then Browse Options....
3.1 Parameters
3.1.1 Mode
Smarty Mode has 2 modes allowing to simplify the writing of Smarty templates. You can enable/disable
each mode individually.
-
- `smarty-electric-mode'
Type: boolean
Default value: `t'
Description: If `t'; enable automatic generation of template.
If `nil'; template generators can still be invoked through key bindings and
menu. Is indicated in the modeline by "/e" after the mode name and can be
toggled by `smarty-electric-mode'.
- `smarty-stutter-mode'
Type: boolean
Default value: `t'
Description: If `t'; enable the stuttering. Is indicated in
the modeline by "/s" after the mode name and can be toggled by `smarty-stutter-mode'.
3.1.2 Menu
Smarty Mode has also 1 menu that you can enable/disable. The menu Sources
is specific to each Smarty files opened.
-
- `smarty-source-file-menu'
Type: boolean
Default value: `t'
Description: If `t'; the Sources menu is enabled. This
menu contains the list of Smarty file located in the current directory. The Sources menu scans
the directory when a file is opened.
3.1.3 Menu
-
- `smarty-highlight-plugin-functions'
Type: boolean
Default value: `t'
Description: If `t'; the functions described
in the smarty plugins are highlighted.
3.1.4 Templates
3.1.4.1 Header
-
- `smarty-file-header'
Type: string
Default value: `""'
Description: String or file to insert as file header. If the string specifies an existing file name the contents
of the file is inserted; otherwise the string itself is inserted as file header.
Type `C-j' for newlines.
The follonwing keywords are supported: <filename>: replaced by
the file name. <author>: replaced by the user name and email address. <login>:
replaced by `user-login-name'. <company>: replaced by `smarty-company-name' content. <date>:
replaced by the current date. <year>: replaced by the current year. <copyright>: replaced by
`smarty-copyright-string' content. <cursor>: final cursor position.
- `smarty-file-footer'
Type: string
Default value: `""'
Description: String or file to insert as file footer.
See `smarty-file-header'
- `smarty-company-name'
Type: string
Default value: `""'
Description: Name of the company to insert in file header.
- `smarty-copyright-string'
Type: string
Default value: `""'
Description: Coryright string to insert in file header.
- `smarty-date-format'
Type: string
Default value: `"%Y-%m-%d"'
Description: Date format.
- `smarty-modify-date-prefix-string'
Type: string
Default value: `""'
Description: Prefix string of
modification date in Smarty file header.
- `smarty-modify-date-on-saving'
Type: bool
Default value: `nil'
Description: If `t'; update the modification date
when the buffer is saved.
3.1.5 Miscellaneous
-
- `smarty-left-delimiter'
Type: string
Default value: `""'
Description: Left escaping delimiter for Smarty templates.
- `smarty-right-delimiter'
Type: string
Default value: `""'
Description: Right escaping delimiter for Smarty templates.
- `smarty-intelligent-tab'
Type: bool
Default value: `t'
Description: If `t'; TAB does indentation; completion and
insert tabulations. If `nil'; TAB does only indentation.
- `smarty-word-completion-in-minibuffer'
Type: bool
Default value: `t'
Description: If `t'; enable completion in the
minibuffer.
- `smarty-word-completion-case-sensitive'
Type: bool
Default value: `nil'
Description: If `t'; completion is case
sensitive.
3.2 Functions
3.2.1 Mode
-
- `smarty-electric-mode'
Menu: Smarty -> Options -> Mode -> Electric Mode
Keybinding: C-c C-m C-e
Description: This functions is used to enable/disable the electric mode.
- `smarty-stutter-mode'
Menu: Smarty -> Options -> Mode -> Stutter Mode
Keybinding: C-c C-m C-s
Description: This function is used to enable/disable the stutter mode.
|