1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>init.lisp</title> |
---|
5 | <LINK REL="stylesheet" HREF="j.css" TYPE="text/css"> |
---|
6 | </head> |
---|
7 | <body> |
---|
8 | <a href="contents.html">Top</a> |
---|
9 | <hr> |
---|
10 | <h1>init.lisp</h1> |
---|
11 | <hr> |
---|
12 | <p> |
---|
13 | Starting (officially) with version 0.20.0, j loads the file ~/.j/init.lisp |
---|
14 | (Unix) or C:\.j\init.lisp (Windows) on startup if it exists. This is done after |
---|
15 | the user's preferences, theme, and custom key maps (if any) have been loaded. |
---|
16 | <p> |
---|
17 | The following commands are officially supported: |
---|
18 | <pre> |
---|
19 | <b>global-map-key</b> <i>key</i> <i>command</i> => <i>generalized-boolean</i> |
---|
20 | <b>global-unmap-key</b> <i>key</i> => <i>generalized-boolean</i> |
---|
21 | <b>map-key-for-mode</b> <i>key</i> <i>command</i> <i>mode</i> => <i>generalized-boolean</i> |
---|
22 | <b>unmap-key-for-mode</b> <i>key</i> <i>mode</i> => <i>generalized-boolean</i> |
---|
23 | </pre> |
---|
24 | You can use these commands to make minor changes to the default key mappings |
---|
25 | without having to define a full set of custom key maps (see |
---|
26 | <a href="keys.html">Key Mappings</a>). |
---|
27 | <p> |
---|
28 | For these commands, the <i>key</i> parameter is the name of the key or key |
---|
29 | combination to be mapped or unmapped (e.g. "F7", "Ctrl Shift G", "J"). When in |
---|
30 | doubt, you can use <a href="commands.html#insertKeyText">insertKeyText</a> to |
---|
31 | insert the appropriate text string. The <i>command</i> parameter is the name of |
---|
32 | the command to be mapped (e.g. "openFile", "cyclePaste", "jdkHelp"). The |
---|
33 | <i>mode</i> parameter is the name of the mode, as displayed in the status bar |
---|
34 | when that particular mode is in effect in the current buffer (e.g. "Java", |
---|
35 | "HTML", "Plain Text"). |
---|
36 | <p> |
---|
37 | Some examples: |
---|
38 | <pre> |
---|
39 | (global-map-key "Mouse-1" "mouseSetPoint") |
---|
40 | (global-unmap-key "F3") |
---|
41 | (map-key-for-mode "Alt Mouse-1" "mouseFindTag" "Java") |
---|
42 | (unmap-key-for-mode "F4" "perl") |
---|
43 | </pre> |
---|
44 | If you make changes to init.lisp while j is running, you can use |
---|
45 | <a href="commands.html#executeCommand">executeCommand</a>, mapped by default to |
---|
46 | Alt X, to reload init.lisp without restarting j, for example: |
---|
47 | <pre> |
---|
48 | (load "/home/peter/.j/init.lisp") |
---|
49 | </pre> |
---|
50 | or: |
---|
51 | <pre> |
---|
52 | (load "C:\\.j\\init.lisp") |
---|
53 | </pre> |
---|
54 | </body> |
---|
55 | </html> |
---|