Module Chamo.Sourceview_rc

Configuration of the "sourceview" view.

val factory_name : string

Name of the view.

val rc_file : string

The user's configuration file.

val mode_rc_file : string -> string

The function to get the configuration file of a mode, from the mode name.

val local_mode_rc_file : string -> string

The function to get the local configuration file of a mode, from the mode name.

val bookmarks_rc_file : string

The bookmarks file.

val key_bindings : (Stk.Key.keystate list * string) list Ocf.conf_option

Key bindings of the view.

val filename_language_patterns : (string * string) list Ocf.conf_option

Associations between regular expressions on filenames and mime type, to get the correct language syntax highlighting.

val filename_mode_patterns : (string * string) list Ocf.conf_option

Associations between regular expressions in filenames and mode names.

val max_undo_levels : int Ocf.conf_option

Maximum undo levels.

val default_wrap_mode : Stk.Textview.wrap_mode Ocf.conf_option

Default wrap mode to use when creating a sourceview, if no indication is given.

val default_word_re : string

Default regexp for words.

val default_theme : string Ocf.conf_option

Default theme for sourceviews.

val read : unit -> unit

Read the configuration file.

val write : unit -> unit

Write the configuration file.

val add_sourceview_key_binding : Stk.Key.keystate list -> string -> unit

This function adds a key binding for the view, described by a combination of key hits and an associated command name.

val add_sourceview_key_binding_string : string -> string -> unit

Same as add_sourceview_key_binding but the combination of key hits is given as a string.

val create_add_sourceview_mode_binding_commands : (Stk.Key.keystate list * string) list Ocf.conf_option -> string -> (Stk.Key.keystate list -> string -> unit) * (string -> string -> unit)

This function creates, for a key bindings option and a given mode name, two functions to add a key binding to the mode, and also register a command to add a binding to the mode. The command name is called add_sourceview_mode_<mode name>_key_binding. This function uses Commands.create_add_binding_commands.