User customization file

You can customize uim settings by two alternative ways.

  - by uim-pref GUI
  - create the file ~/.uim and write configuration forms by hand

This file describes the latter way.


* Precedence of settings

  - The ~/.uim overrides the settings configured by uim-pref. Remove
    conflicting setting from ~/.uim if you prefer setting by GUI

  - If ~/.uim does not exist, ${datadir}/uim/default.scm will be
    loaded as default. Since the default.scm is never modified by
    uim, system integrator can modify it as they want.


* Special settings that cannot be configured in ~/.uim

  Overriding following variables in ~/.uim does not take
  effect. Configure them in uim-pref or edit installed-modules.scm
  directly.

    enable-lazy-loading?
    enabled-im-list
    installed-im-module-list


* Overriding lazy-loaded settings

  The lazy-loading feature introduced in uim 0.4.6 has caused the
  problem that the entity to be overridden is not loaded at loading
  ~/.uim.

  For example, following configuration causes the error because
  japanese.scm is not loaded at loading ~/.uim.

  (set! ja-rk-rule-basic (cons '(((" ") . ()) (" " " " " "))
                               ja-rk-rule-basic))
  (ja-rk-rule-update)

  To resolve it, require the file explicitly.

  (require "japanese.scm")

  (set! ja-rk-rule-basic (cons '(((" ") . ()) (" " " " " "))
                               ja-rk-rule-basic))
  (ja-rk-rule-update)


  If you need whole part of an input method, use 'require-module'
  instead of ordinary 'require'. This is required for internal IM
  management.

  wrong:

    (require "pyload.scm")
    (require "viqr.scm")
    (require "anthy.scm")
    (require-dynlib "anthy")

  correct:

    (require-module "pyload")
    (require-module "viqr")
    (require-module "anthy")


* Configuring key bindings

  To configure key bindings in ~/.uim, write 'define-key' forms. See
  also doc/KEY for further information

  Be careful about following two issues.

    - Corresponding input method must be loaded by 'require-module'
      before define-key. This implies that define-key described in
      ~/.uim disables lazy-loading for the input method.

      (require-module "skk")
      (define-key skk-cancel-key? "<Control>[")

    - Meaning of the key expression such as "<Control>a" differs
      between define-key and uim-pref.

      "<Control>a" is interpreted as case sensitive and shift
      insensitive by define-key. But uim-pref recognizes it as case
      insensitive and shift sensitive. The different rule of uim-pref
      is introduced to unify "<Control>a" and "<Control>A" regardless
      of caps lock status.
