General
cancel
Showing results for 
Search instead for 
Did you mean: 

display the line and column number on bottom right corner

Tamilselvan
Occasional Visitor

display the line and column number on bottom right corner

How to set the vi editor to display the line and column number on the screen. It is usefull to write a Cobol progrmm to see the column number. becuause cobol ignore the statment after column number 72 so that i can go for next line to type the statement while the column number exceeds 72 character.
7 REPLIES
Pete Randall
Outstanding Contributor

Re: display the line and column number on bottom right corner

:set number and :set nonumber

will turn line numbers on/off. I don't recall a method for showing column numbers. though I would think there must be a way to set line width. I'll do some more checking.

:set all will show you all options


Pete

Pete
bright image
Frequent Advisor

Re: display the line and column number on bottom right corner

Frank de Vries
Respected Contributor

Re: display the line and column number on bottom right corner

Inside vi it is like this:

Type colon :
and type set number

:set number

Look before you leap
OldSchool
Honored Contributor

Re: display the line and column number on bottom right corner

in "vi", :set nu will give you the line number only, the same applies to "vim"

as far as I can tell, "vim" doesn't have an option to display line/col either. gvim / kedir however do this by default, but would require X-Windows...

note that certain terminals will provide this information in the "status line" if enabled (vt220 comes to mind). Don't know which terminal emulators can / do support that feature however.
Hein van den Heuvel
Honored Contributor

Re: display the line and column number on bottom right corner

Tamilselvan,

Let's take a step back.
Are you sure your need to stick to 72 columns ?
Did you check the documentation?

Exactly what compiler? Micro Focus?

This is the 20th century you know.
You are now free to roam the country and free to use any number of columns you please for the Cobol compilers I know.
You would opt for "free text" or "terminal format" instead of 'ANSI' / 80-character card image records ( optional sequence numbers in character positions 1 through 6, indicators in position 7, Area A beginning in position 8, Area B beginning in position 12, and the identification area in positions 73 through 80. )

fwiw,
Hein.

http://g4u0419c.houston.hp.com/cgi-bin/doc3k/B59627345.13762/12


Tamilselvan
Occasional Visitor

Re: display the line and column number on bottom right corner

Thank u for your kind replay.
Tamilselvan
Occasional Visitor

Re: display the line and column number on bottom right corner

Thank u for your kind reply.