On 16/04/10 22:38, John Culleton wrote:
[...]
Gvim knows I am using legacy format. It highlights bad code placement in
red. And it is not a problem of what position land on. It is a problem
where I do a return after editing line A and line A suddenly leaps to the
right. Now I have a program that renumbers with the traditional 6 digits
e.g.,
000010 IDENTIFICATION DIVISION.
But Gvim goes crazy when I insert four spaces followed by
10 IDENTIFICATION DIVISION.
When I hit return at the end of that line then it leaps to the right and
of course is colored red because it is no longer valid COBOL code.
I'll renumber using the old style and see what happens.
Aha! It's the line you just left which gets indented, not the one after
the line break; and two digits followed by a space could look like a
DATA DIVISION level-number... which belongs in column 8 if it's 01, or
in column 12 or more if it's higher than that. If the 'indentexpr'
doesn't look at a more global level to make sure that level-numbers
happen only in the DATA DIVISION, not in the IDENTIFICATION DIVISION, it
might push a line whose first non-blank characters are 10 followed by a
space so that the 10 moves to column 12 or higher.
Best regards,
Tony.
--
A new koan:
If you have some ice cream, I will give it to you.
If you have no ice cream, I will take it away from you.
It is an ice cream koan.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Subscription settings: http://groups.google.com/group/vim_use/subscribe?hl=en