On Friday 16 April 2010 15:11:05 Tony Mechelynck wrote:
> On 16/04/10 20:16, John Culleton wrote:
> >   When I hit the "Enter" key at the end of a line the current line
> > jumps right about ten spaces. So I have to go back to delete the extra
> > spaces. I use traditional COBOL line numbers in columns 1-6 but with
> > leading zero suppresson.
> >
> > Suggestions?
>
> It shouldn't be "about ten" but either seven (leaving you in column 8,
> after a 6-character line number then one column for space, - or *, and
> ready to type a paragraph-, section- or division-name), or eleven,
> leaving you in column 12, ready to type the contents of a paragraph.
>
> Maybe you could leave the "new line numbers" temporarily blank, and
> renumber your source file afterwards? Possibly using linewise-visual (or
> programmatic) blocks, so that the IDENTIFICATION DIVISION gets line
> numbers starting at 000010, the ENVIRONMENT DIVISION starting at 100000,
> the DATA DIVISION, maybe starting at 200000 or so, and the PROCEDURE
> DIVISION starting at 500000 ? And, of course (if you really want a
> "traditional" numbering scheme), numbered by tens so new lines can be
> inserted without disturbing the existing numbers. ;-)
>
> I think there is a way to tell Vim whether you're using "traditional" or
> "modern" COBOL programming style... let me check...
>
> Ah, there. Does
>
>       :let g:cobol_legacy_code = 1
>
> make a difference? The other possibility is
>
>       :silent! unlet g:cobol_legacy_code
>
> see :help ft-cobol-syntax
>
>
> Best regards,
> Tony.
> --
> Coward, n.:
>       One who in a perilous emergency thinks with his legs.
>               -- Ambrose Bierce, "The Devil's Dictionary"

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.
-- 
John Culleton
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
http://www.booklocker.com/books/4055.html
http://www.scribd.com/doc/24676863/

-- 
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

Reply via email to