Displaying column number on vi

Displaying column number on vi

Post by ccboo » Tue, 11 Mar 1997 04:00:00



unix/vi user group,
   Can we display the cursor position in terms of column position in
vi editor. the "n"| command can bring you to the specific position,
but I want to see it when typing. Any help will be appreciated.

--
Boone Teh
Consultant
Technology Partners Inc.
St. Louis

 
 
 

Displaying column number on vi

Post by Jacob Langfor » Tue, 11 Mar 1997 04:00:00


Quote:>    Can we display the cursor position in terms of column position in
> vi editor. the "n"| command can bring you to the specific position,
> but I want to see it when typing. Any help will be appreciated.

I use vim, an improved version.  The extra features make it worth
installing.  A new version has recently been released.  Check the
standard ftp sites.

 
 
 

Displaying column number on vi

Post by Dan Merc » Tue, 11 Mar 1997 04:00:00


: unix/vi user group,
:    Can we display the cursor position in terms of column position in
: vi editor. the "n"| command can bring you to the specific position,
: but I want to see it when typing. Any help will be appreciated.

: --
: Boone Teh
: Consultant
: Technology Partners Inc.
: St. Louis

:set number

which can be condensed to

:se nu

--
Dan Mercer

Opinions expressed herein are my own and may not represent those of my employer.

 
 
 

Displaying column number on vi

Post by Hong Hunso » Fri, 14 Mar 1997 04:00:00


Dan Mercer writes:

> : unix/vi user group,
> :    Can we display the cursor position in terms of column position in
> : vi editor. the "n"| command can bring you to the specific position,
> : but I want to see it when typing. Any help will be appreciated.

> : --
> : Boone Teh
> : Consultant
> : Technology Partners Inc.
> : St. Louis

> :set number

> which can be condensed to

> :se nu

Really?
I think what you intended to say was
:set ruler
 
 
 

Displaying column number on vi

Post by Dan Merc » Fri, 14 Mar 1997 04:00:00



: Dan Mercer writes:


: > : unix/vi user group,
: > :    Can we display the cursor position in terms of column position in
: > : vi editor. the "n"| command can bring you to the specific position,
: > : but I want to see it when typing. Any help will be appreciated.
: >
: > : --
: > : Boone Teh
: > : Consultant
: > : Technology Partners Inc.
: > : St. Louis
: >
: > :set number
: >
: > which can be condensed to
: >
: > :se nu

: Really?
: I think what you intended to say was
: :set ruler

Ack - this was supposed to be a response to someone asking how to
see the line numbers in vi.  I responded to the wrong article.

--
Dan Mercer

Opinions expressed herein are my own and may not represent those of my employer.

 
 
 

Displaying column number on vi

Post by Cookie Monste » Sat, 15 Mar 1997 04:00:00




> : Really?
> : I think what you intended to say was
> : :set ruler

> Ack - this was supposed to be a response to someone asking how to
> see the line numbers in vi.  I responded to the wrong article.

So can we get column numbers? My vi has no "ruler" option and I can't find
"column" on the man page. I didn't think vi could do this.
 
 
 

Displaying column number on vi

Post by Erikson Verga » Sun, 16 Mar 1997 04:00:00




: > : Really?
: > : I think what you intended to say was
: > : :set ruler
: >
: > Ack - this was supposed to be a response to someone asking how to
: > see the line numbers in vi.  I responded to the wrong article.

: So can we get column numbers? My vi has no "ruler" option and I can't find
: "column" on the man page. I didn't think vi could do this.

--
Try :set all to see a list of all options.  If you see number, nonumber,
use :set number

                           -Erikson Vergara

              \";|;"/                ___________  
                W                    /    |        
            __|  |_A _^_^_^_^_/___|_____|
      (E      //      //        //  | ~ EJV ~  |
          |~~||~69~||~~~~||~ | -  LINE  - |         All ABOARD!!
         /\__\\____\\_____\\_|__|___ |__|_

TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT    TTTTTTTTTTTTTTTTTT

 
 
 

Displaying column number on vi

Post by Hong Hunso » Mon, 17 Mar 1997 04:00:00


"Cookie Monster"  writes:


> > : Really?
> > : I think what you intended to say was
> > : :set ruler

> > Ack - this was supposed to be a response to someone asking how to
> > see the line numbers in vi.  I responded to the wrong article.

> So can we get column numbers? My vi has no "ruler" option and I can't find
> "column" on the man page. I didn't think vi could do this.

Yes. traditional vi has no :set ruler option.
There are a lot of vi-clones.  They usually have that option.
Try vim, or nvi, or elvis, or etc.

Visit vi home page.

 
 
 

Displaying column number on vi

Post by Cookie Monste » Tue, 18 Mar 1997 04:00:00


Erikson Vergara wrote ...


[big snippperonie]
> Try :set all to see a list of all options.  If you see number, nonumber,
> use :set number

I have "number" - it gives LINE numbers.
I have no "ruler" - it was suggested that this gives COLUMN numbers but
I've never seen column numbers displayed by any vi. Is the "ruler" option a
recent innovation or something?
 
 
 

Displaying column number on vi

Post by Mike Barnar » Thu, 20 Mar 1997 04:00:00



<snip original posting re: seeing cursor column position in vi>

Quote:>: I think what you intended to say was
>: :set ruler

Hmm, I'm running SVR4 on Sun Solaris and when I try "set ruler"
in vi, I get:

ruler: No such option - 'set all' gives all option values

Am I missing something?

Curious,
Mike

 
 
 

Displaying column number on vi

Post by Tom » Fri, 21 Mar 1997 04:00:00




> <snip original posting re: seeing cursor column position in vi>

> >: I think what you intended to say was
> >: :set ruler

> Hmm, I'm running SVR4 on Sun Solaris and when I try "set ruler"
> in vi, I get:

> ruler: No such option - 'set all' gives all option values

> Am I missing something?

> Curious,
> Mike

Try nvi by Keith Bostic, available at ucb berkeley. Using se ruler gives
the line and column number on the status line. It also has a killer
history editing facility, ala ksh. A fine, fine piece of work and highly
recommended. I use it on solaris and linux.

tom.

 
 
 

Displaying column number on vi

Post by Tony Fitzgera » Mon, 24 Mar 1997 04:00:00





>>: I think what you intended to say was
>>: :set ruler
>ruler: No such option - 'set all' gives all option values
>Am I missing something?

Possibly the Vi IMproved (VIM) editor.  Written mostly by Bram
Moolenaar, the most recent version appears to be 4.6.  Provides the
above command (plus many, many more functional enhancements to vi.)

What sold me on vim was the split screen function to allow multiple
views into the edit buffer or the ability to edit different files in the
views, however, it's got unlimited undo support for arrow keys in insert
and replace mode, a "history" mechanism of previous search and ex
commands, an on-line help, etc...

In preparing a seminar on vim for our IS group, I discovered the GUI
option which allows you to launch vim as an X client with scroll bars
and support for mouse based cut and paste operations.  I also discovered
the "digraph" facility for entering accented characters and much more.

From ftp.FU-Berlin.DE  in the directory  /unix/editors/vim

The build was trivial on Solaris 2.5, however, there are a couple of
"interesting" features disabled by default.  "Rightleft" support, for
example for displaying the start of lines at the right margin (e.g for
entering Hebrew or Arabic.)

Mind you, it's not emacs, so there's no support for generating calendars
and it might be nice if there were an interface to ispell...
--

 
 
 

1. how to determine column number in vi etc.

Is there a command or utility to show a column number while viewing a file?

I have seen mainframers use a tool that displays something like this

|234|6789|234|6789|234|6789|234|6789|234|6789|234|6789|234|6789|234|6789|234
|6789

at the top of the screen.  You can scroll through the file and this stays
at the top of the display.  Yes, I am working with positional data.
TIA

2. TTY device vs printer?

3. Column number in vi

4. Redhat Advisory

5. column number of cursor in vi?

6. how is the packet been "seen" by (web) servers?

7. Displaying Vi line numbers

8. DHCP/DNS/Behind FW => slow internet

9. Displaying Line Numbers in Vi

10. Column in VI / Landscape in lp ?

11. deleting columns in vi

12. 132-column mode in vi

13. To remove columns of text in vi?