This mode was designed to be used in joint with the Pseudo Macros (*Note
Pseudo Macros::) and the Real Tabs mode in off to achieve an easy way to
indent the code making a better work than the Autoindent mode.
In this mode the spaces inserted after pressing <ENTER> depends on the
first word in the last line, for example, if you have:
if (a==b)_
With the cursor in the '_' position and press <ENTER> you'll get:
if (a==b)
_
Now you can do two things, 1) press space and write the code that will be
executed by the if, or 2) if this a multiline code press { and <ENTER>, in
the last case you'll get:
if (a==b)
{
_
Now type your first line of code, press <ENTER>, write your next line,
press <ENTER> again and then Backspace:
if (a==b)
{
1st line;
2nd line;
_
Now type } and press <ENTER> one more time:
if (a==b)
{
1st line;
2nd line;
}
_
As you can see the code is perfectly aligned without a significant work
from your part.
I tried to make this mode as smart as possible, but needs more work, if
you have suggestions contact me.
Another important thing is that this indentation have a personal style,
mine style ;-), so may be you don't like it. If that's your case you can
do the following things:
* Use another way of indentation offered by the editor, for example,
turn on the Real Tabs mode and indent with tabs.
* Customize the pmacros.txt file (*Note Pseudo Macros::), actually this
file is coherent with this mode.
* The editor isn't configurable like Emacs or Brief using a language,
but is writed in C++ and chances that you know C++ are over the 90%
so contact me and I'll help you to write the routines that you need
to get an indentation in your own style :-).
* Menu:
* Can you explain to me more about the behavior of this mode?::
* Do you have more examples?::
File: editor.inf, Node: Can you explain to me more about the behavior of this mode?, Next: Do you have more examples?, Prev: Intelligent C indent, Up: Intelligent C indent
4.5.1 Can you explain to me more about the behavior of this mode?