From 77e679d3f6d1a0b73d9e13df1b97a5dc18a9549b Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Sat, 24 Jun 2017 21:00:59 +0200 Subject: [PATCH] +doc to defun --- config-general-mode.el | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/config-general-mode.el b/config-general-mode.el index af5f50d..bdf0d0e 100644 --- a/config-general-mode.el +++ b/config-general-mode.el @@ -423,6 +423,65 @@ The flag `kill-whole-line' will be followed." ;;;###autoload (define-derived-mode config-general-mode conf-mode "config-general" "Config::General config file mode. + +Config::General is a Perl module for parsing config files with +some enhanced features. `config-general-mode' makes it easier to +edit such config files with emacs. + +It is based on `conf-mode' with the following features: + +- good syntax highlighting for config files +- completion support with `' (using `dabbrev') +- imenu support for +- electric paring mode (for quotes, parens, etc) enabled +- automatic indenting +- jump to include file with `' + +To use, save config-general-mode.el to a directory in your +load-path. + +Add something like this to your config: + + (require 'config-general-mode) + (add-to-list 'auto-mode-alist '(\"\\.conf$\" . config-general-mode)) + +or load it manually, when needed: + + M-x config-general-mode + +You can also enable it with a buffer-local variable by adding +this as the first line of a config file: + + # -*-config-general-*- + +Usage + +Edit your config file as usual. Use `' for completion of +values and variables. Use `C-c C-t' to toggle flags (like true +to false). Use `C-c C-=' on a region to automatically align on +the `=` character. Use `C-c C-/' to breakup a region with long +lines into shorter ones using backslash notation. Use +`' to visit an included file or (when not on a link) +insert a new line below the current one, indent and move point +there. Use `' to delete lines, including continuation lines +or whole blocks. Use `C-c C-j' to jump to a block +definition (same as using `imenu' with the mouse). + +Customize + +You can customize the mode with: + + M-x customize-group RET config-general-mode RET + +You can also use hooks to config-general mode as a way to modify +or enhance its behavior. The following hooks are available: + + config-general-mode-hook + +For example: + + (add-hook 'config-general-mode-hook 'electric-indent-mode) + \\{config-general-mode-map}" ;; initialize mode