Loading ...
Sorry, an error occurred while loading the content.

showing line & column #'s as you move cursor

Expand Messages
  • Brandy Gamblin
    Hi everyone, this may be a general VI question... but I am running it on my mac... & I haven t found anywhere else to post this question.. so here goes. when I
    Message 1 of 3 , Feb 22, 2007
    • 0 Attachment
      Hi everyone,
      this may be a general VI question... but I am running it on my mac... & I
      haven't found anywhere else to post this question.. so here goes.

      when I use VI on my linux machine, the bottom of the window shows the
      current line & column # as I move the cursor around. I can't find the
      setting to turn this feature on in my mac's version of VI.

      any ideas or suggestions?

      thanks!
    • Michael Wookey
      Hi, ... For example, my statusline below is the following and displays the current line and row, the percentage through the file, current byte offset in the
      Message 2 of 3 , Feb 22, 2007
      • 0 Attachment
        Hi,

        > when I use VI on my linux machine, the bottom of the window shows the
        > current line & column # as I move the cursor around. I can't find the
        > setting to turn this feature on in my mac's version of VI.

        Have a look at:

        :help statusline

        For example, my statusline below is the following and displays the
        current line and row, the percentage through the file, current byte
        offset in the file, hex value of the character under the cursor, current
        buffer number and several other things.

        set statusline=%y\ %f%00(\ %m%*%)%00(\ %r%*%)%00(\ %h%w%)\ %=%36(\
        [0x%B][O:0x%O][B:%n][L:%l/%L][C:%2c-%2v][%%:%p]%)

        cheers
      • John Love-Jensen
        Hi Brandy, Always display a status line ... Try one of these status lines ... Here s the status line I use ... HTH, --Eljay
        Message 3 of 3 , Feb 22, 2007
        • 0 Attachment
          Hi Brandy,

          " Always display a status line
          :set laststatus=2

          " Try one of these status lines
          :set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
          :set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P

          " Here's the status line I use
          :set statusline=%m\ %f%r\ [%{&syntax},%{&fileformat}]%=x%02B\ %03c-%03v,%04l

          :help laststatus
          :help statusline

          HTH,
          --Eljay
        Your message has been successfully submitted and would be delivered to recipients shortly.