source: tags/0.12.0/j/doc/FAQ.html

Last change on this file was 2, checked in by piso, 22 years ago

Initial checkin.

File size: 4.5 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<html>
4
5<head>
6<title>J User's Guide - Frequently Asked Questions</title>
7<LINK REL="stylesheet" HREF="j.css" TYPE="text/css">
8</head>
9
10<body>
11
12<a href="contents.html">Top</a>
13
14<hr>
15
16<h1>Frequently Asked Questions</h1>
17
18<hr>
19
20<p>
21  <b>How do I get j to use the ISO-8859-2 encoding when loading and saving files?</b>
22</p>
23<p>
24  Add the following line to your <a href="preferences.html">preferences</a> file:
25</p>
26  <pre>
27    defaultEncoding = ISO8859_2</pre>
28
29<p>
30  <b>What's up with the Tab key?</b>
31</p>
32<p>
33  In programming modes (including Java, JavaScript, C, C++, PHP, Python, HTML,
34  and XML), the Tab key is mapped by default to the command
35  <a href="commands.html#tab">tab</a>. The default behavior of this command is
36  to re-indent the current line according to j's idea of correct indentation.
37</p>
38<p>
39  If you want to get rid of this behavior, you can create a custom key map for
40  the mode in question that maps the Tab key to <a href="commands.html#insertTab">insertTab</a>
41  (see <a href="keys.html">Key Mappings</a>). You might also want to map some other key to
42  <a href="commands.html#indentLineOrRegion">indentLineOrRegion</a>, which
43  provides the re-indentation functionality assigned by default to the Tab key.
44</p>
45<p>
46  A less radical step is to add the following line to your <a href="preferences.html">preferences</a>
47  file:
48  <pre>
49    tabAlwaysIndent = false</pre>
50  If <a href="commands.html#tabAlwaysIndent">tabAlwaysIndent</a> is false, the behavior of
51  the tab command depends on the location of the caret.
52  If the caret is at the very beginning of the text on the line, or in the
53  whitespace to the left of the text, tab calls <a href="commands.html#indentLine">indentLine</a>.
54  If the caret is in the midst of the actual text on the line, tab
55  inserts either a single tab character or the equivalent number of spaces,
56  depending on the setting of the <a href="preferences.html#useTabs">useTabs</a> property.
57<p>
58  <code>tabAlwaysIndent</code> is true by default.
59</p>
60<p>
61  <code>tabAlwaysIndent</code> is a mode-specific property,
62  so you can set it for a specific mode if that's what you want:
63  <pre>
64    JavaMode.tabAlwaysIndent = false</pre>
65<p>
66  <b>Why don't certain keys work in j?</b>
67</p>
68<p>
69  There is no single answer to this question.
70</p>
71<p>
72  There are <a href="http://developer.java.sun.com/developer/bugParade/bugs/4371923.html">known bugs</a>
73  on specific platforms with specific versions of Java and certain keyboards
74  (German, Swedish, and possibly others). If you suspect that this is your
75  problem, you might try switching to another version of Java. On Linux, IBM
76  1.3 seems to have the fewest problems, and Blackdown's version of 1.3 seems
77  to be better than Sun's. But your mileage may vary. In any case, if the key
78  in question doesn't work with the Swing Notepad demo, there's not much chance
79  that it will work in j. Complain to your Java vendor!
80</p>
81<p>
82  If the key in question works with the Swing Notepad demo but does not work
83  with j, please <a href="mailto:peter@armedbear.org">let me know</a>. Be sure
84  to mention what platform you're running on, what version of Java you're
85  using, and your locale.
86</p>
87<p>
88  The command <a href="commands.html#insertKeyText">insertKeyText</a> may be
89  useful in debugging keyboard problems.
90</p>
91
92<p>
93  <b> When selecting text with the keyboard, if I want to select multiple
94  lines, the first line is always selected completely. If I just want to
95  select part of the first line, I've got to do it with the mouse.</b>
96</p>
97<p>
98  That's not a bug, that's a feature (really). The idea is that selecting
99  whole lines is the more common case when the selection spans multiple lines,
100  so j tries to save you an extra keystroke in that situation.
101</p>
102<p>
103  When you just want to select part of the text on the first line, you can use
104  the left or right arrow key to select a single character first, and then use
105  the up or down key to extend the selection. This costs you an extra
106  keystroke, but it's the less common case. Or at least that's the idea.
107</p>
108<p>
109  If you don't like this behavior, you can disable it by adding the following
110  line to your <a href="preferences.html">preferences</a> file:
111  <pre>
112    autoSelectLine = false</pre>
113<p>
114  <b> I just upgraded to Mac OS X 10.2, and now j has odd display problems.</b>
115</p>
116<p>
117  It may help to disable hardware acceleration when starting j:
118  <pre>
119    java -Dcom.apple.hwaccel=false -jar j.jar</pre>
120</body>
121
122</html>
Note: See TracBrowser for help on using the repository browser.