Starting (officially) with version 0.20.0, j loads the file ~/.j/init.lisp (Unix) or C:\.j\init.lisp (Windows) on startup if it exists. This is done after the user's preferences, theme, and custom key maps (if any) have been loaded.
The following commands are officially supported:
global-map-key key command => generalized-boolean
global-unmap-key key => generalized-boolean
map-key-for-mode key command mode => generalized-boolean
unmap-key-for-mode key mode => generalized-boolean
You can use these commands to make minor changes to the default key mappings
without having to define a full set of custom key maps (see
Key Mappings).
For these commands, the key parameter is the name of the key or key combination to be mapped or unmapped (e.g. "F7", "Ctrl Shift G", "J"). When in doubt, you can use insertKeyText to insert the appropriate text string. The command parameter is the name of the command to be mapped (e.g. "openFile", "cyclePaste", "jdkHelp"). The mode parameter is the name of the mode, as displayed in the status bar when that particular mode is in effect in the current buffer (e.g. "Java", "HTML", "Plain Text").
Some examples:
(global-map-key "Mouse-1" "mouseSetPoint")
(global-unmap-key "F3")
(map-key-for-mode "Alt Mouse-1" "mouseFindTag" "Java")
(unmap-key-for-mode "F4" "perl")
If you make changes to init.lisp while j is running, you can use
executeCommand, mapped by default to
Alt X, to reload init.lisp without restarting j, for example:
(load "/home/peter/.j/init.lisp")
or:
(load "C:\\.j\\init.lisp")