Re: [jasspa] Auto indention is driving me crazy!!!!
- smithno999 wrote:
> At this point, I use ME for everything EXCEPT code. The only thingIn a java or perl buffer do the following:
> stopping me from using it as my only editor is auto indention! When I
> type a return on a indented line, it re-indents the current line to
> match the prvious line, then inserts the new line indented to the new
> indention. I read the FAQ and the help files and I can't come up with
> a combination of settings that will just indent the NEXT line to match
> the CURRENT line!
> I even decided that I could live with no auto indents. I can't get
> that to work either. I can get ME to not indent the next line, but it
> reformatts the current line back to the margin.
> I am experiencing this with Java and Perl files. Any ideas?
> Based on this I would like to make an enhancement request to have a
> checkbox in the user setup to make a TAB just put in a TAB character
> with NO reformatting of lines!!!
M-x buffer-setup OR Help->Buffer setup
Uncheck "Setup Auto Indent"
This turns off auto indent.
Check Buffer Modes "Indent"
You need the buffer mode Indent on because when you do a CR then it
drops to the next line and leaves the cursor aligned with the start of
the text of the previous line. When this is off then it leaves the
cursor at the start of the line.
You say that you want literal TABs in the file, if this really is the
case then set Buffer Modes "Tab" to 'off'. The default behaviour is to
insert spaces and convert tabs to spaces using the indent width. (The
advantage of this is that any file, irrespective of the indent width
used will ALWAYS look the same in any editor even Microsoft notepad).
You can set up your indent and TAB size in here.
Once you have done this then all java/perl files will exhibit the
behaviour that you require.
I will update the documentation to make this explicitly clear, it
certainly is not at the moment - sorry.