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

Re: Vim 7.2 on CentOS 6 - set ruler has no effect

Expand Messages
  • Ben Fritz
    ... ruler has no effect if you have a custom statusline setting. Is this the case? -- You received this message from the vim_use maillist. Do not
    Message 1 of 11 , Oct 2, 2011
    • 0 Attachment
      On Oct 1, 7:09 pm, "Ismail, Mohd F." <fa...@...> wrote:
      > Hi,
      >
      > I'm using CentOS 6, with vim 7.2.  For whatever reason, there is no row and column info at the bottom right corner.  I check the /etc/vimrc and set ruler is enabled.  What could be the problem?
      >
      > --Farid

      'ruler' has no effect if you have a custom 'statusline' setting. Is
      this the case?

      --
      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
    • Ismail, Mohd F.
      Hi Tony, When I type that command in vim window, it gives me nothing. It just returns the cursor position to its initial position. Am I supposed to type it
      Message 2 of 11 , Oct 2, 2011
      • 0 Attachment
        Hi Tony,

        When I type that command in vim window, it gives me nothing. It just returns the cursor position to its initial position. Am I supposed to type it some where else?

        Hi Ben Fritz,

        I looked into the vimrc and there is no statusline keyword anywhere in the file. I didn't customize my vi and just use what ever was set up by CentOS people.

        --Farid

        ________________________________________
        From: Tony Mechelynck [antoine.mechelynck@...]
        Sent: Saturday, October 01, 2011 8:19 PM
        To: vim_use@...
        Cc: Ismail, Mohd F.
        Subject: Re: Vim 7.2 on CentOS 6 - set ruler has no effect

        On 02/10/11 02:09, Ismail, Mohd F. wrote:
        > Hi,
        >
        > I'm using CentOS 6, with vim 7.2. For whatever reason, there is no row
        > and column info at the bottom right corner. I check the /etc/vimrc and
        > set ruler is enabled. What could be the problem?
        >
        > --Farid

        What does Vim answer to ":echo has('cmdline_info')" (without the double
        quotes but with the single ones)? If it's 0 (zero), then the 'ruler'
        feature wasn't included at compile-time.

        BTW, Vim 7.2 is obsolete now (though admittedly less than the Vim 5.x I
        saw someone use recently). The current version is 7.3.329. If you're
        interested, see
        http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
        http://users.skynet.be/antoine.mechelynck/vim/compunix.htm


        Best regards,
        Tony.
        --
        After a number of decimal places, nobody gives a damn.

        --
        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
      • Tony Mechelynck
        ... You should be using Vim in Normal mode, then type ... followed by hitting Enter. A 0 (zero, meaning no ) or a 1 (one, meaning yes ) should appear at
        Message 3 of 11 , Oct 2, 2011
        • 0 Attachment
          On 02/10/11 18:24, Ismail, Mohd F. wrote:
          > Hi Tony,
          >
          > When I type that command in vim window, it gives me nothing. It just returns the cursor position to its initial position. Am I supposed to type it some where else?

          You should be using Vim in Normal mode, then type

          :echo has('cmdline_info')

          followed by hitting Enter. A 0 (zero, meaning "no") or a 1 (one, meaning
          "yes") should appear at bottom left of your Vim screen. Anything you
          type will make it disappear again.

          >
          > Hi Ben Fritz,
          >
          > I looked into the vimrc and there is no statusline keyword anywhere in the file. I didn't customize my vi and just use what ever was set up by CentOS people.

          Aha! Is it ~/.vimrc or $VIM/vimrc or /etc/vimrc or something else? If
          anything but the first of these, Vim will be in 'compatible' mode by
          default. What do you see at the bottom of the screen if (in Normal mode)
          you type

          :verbose set ruler?

          (with the question mark), followed by hitting the Enter key?

          >
          > --Farid

          Oh, and BTW, the custom of these lists is to reply below, not above, the
          text you're replying to.


          Best regards,
          Tony.
          --
          Idiot, n.:
          A member of a large and powerful tribe whose influence in human
          affairs has always been dominant and controlling.
          -- Ambrose Bierce, "The Devil's Dictionary"

          --
          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
        • Tony Mechelynck
          ... Yes, and the absence of the word statusline from the vimrc doesn t mean it isn t set -- it can also be named stl . Farid, try typing ... in Normal mode,
          Message 4 of 11 , Oct 2, 2011
          • 0 Attachment
            On 02/10/11 17:40, Ben Fritz wrote:
            >
            >
            > On Oct 1, 7:09 pm, "Ismail, Mohd F."<fa...@...> wrote:
            >> Hi,
            >>
            >> I'm using CentOS 6, with vim 7.2. For whatever reason, there is no row and column info at the bottom right corner. I check the /etc/vimrc and set ruler is enabled. What could be the problem?
            >>
            >> --Farid
            >
            > 'ruler' has no effect if you have a custom 'statusline' setting. Is
            > this the case?
            >

            Yes, and the absence of the word "statusline" from the vimrc doesn't
            mean it isn't set -- it can also be named "stl". Farid, try typing

            :verbose set stl?

            in Normal mode, followed by Enter, and see what appears at bottom left
            of your Vim screen.


            Best regards,
            --
            hundred-and-one symptoms of being an internet addict:
            191. You rate eating establishments not by the quality of the food,
            but by the availability of electrical outlets for your PowerBook.

            --
            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
          • Ismail, Mohd F.
            ________________________________________ From: Tony Mechelynck [antoine.mechelynck@gmail.com] Sent: Sunday, October 02, 2011 12:53 PM To: Ismail, Mohd F. Cc:
            Message 5 of 11 , Oct 2, 2011
            • 0 Attachment
              ________________________________________
              From: Tony Mechelynck [antoine.mechelynck@...]
              Sent: Sunday, October 02, 2011 12:53 PM
              To: Ismail, Mohd F.
              Cc: vim_use@...
              Subject: Re: Vim 7.2 on CentOS 6 - set ruler has no effect

              On 02/10/11 18:24, Ismail, Mohd F. wrote:
              > Hi Tony,
              >
              > When I type that command in vim window, it gives me nothing. It just returns the cursor position to its initial position. Am I supposed to type it some where else?

              You should be using Vim in Normal mode, then type

              :echo has('cmdline_info')

              followed by hitting Enter. A 0 (zero, meaning "no") or a 1 (one, meaning
              "yes") should appear at bottom left of your Vim screen. Anything you
              type will make it disappear again.

              >
              > Hi Ben Fritz,
              >
              > I looked into the vimrc and there is no statusline keyword anywhere in the file. I didn't customize my vi and just use what ever was set up by CentOS people.

              Aha! Is it ~/.vimrc or $VIM/vimrc or /etc/vimrc or something else? If
              anything but the first of these, Vim will be in 'compatible' mode by
              default. What do you see at the bottom of the screen if (in Normal mode)
              you type

              :verbose set ruler?

              (with the question mark), followed by hitting the Enter key?

              >
              > --Farid

              Oh, and BTW, the custom of these lists is to reply below, not above, the
              text you're replying to.


              Best regards,
              Tony.
              --
              Idiot, n.:
              A member of a large and powerful tribe whose influence in human
              affairs has always been dominant and controlling.
              -- Ambrose Bierce, "The Devil's Dictionary"



              Hi Tony,

              I tried both with /etc/vimrc and ~/.vimrc (copying from /etc/vimrc to .vimrc in my home directory), and they both behaved similarly.

              When I type :echo has('cmdline_info'), like I said, nothing happens. The cursor just go back to its original position. No 0 or 1 at the bottom left corner. The command :echo has ('cmdline_info') remains there until I go into insert mode or type some other command.

              When I type :verbose set ruler?, I got, at the bottom left corner, in red background E519: Option not supported: ruler?

              Below is the .vimrc file if it is of any help:

              ============================Begin .vimrc===============================

              if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
              set fileencodings=ucs-bom,utf-8,latin1
              endif

              set nocompatible " Use Vim defaults (much better!)
              set bs=indent,eol,start " allow backspacing over everything in insert mode
              "set ai " always set autoindenting on
              "set backup " keep a backup file
              set viminfo='20,\"50 " read/write a .viminfo file, don't store more
              " than 50 lines of registers
              set history=50 " keep 50 lines of command line history
              set ruler " show the cursor position all the time
              set showcmd
              set number

              " Only do this part when compiled with support for autocommands
              if has("autocmd")
              augroup redhat
              autocmd!
              " In text files, always limit the width of text to 78 characters
              autocmd BufRead *.txt set tw=78
              " When editing a file, always jump to the last cursor position
              autocmd BufReadPost *
              \ if line("'\"") > 0 && line ("'\"") <= line("$") |
              \ exe "normal! g'\"" |
              \ endif
              " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
              autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
              " start with spec file template
              autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
              augroup END
              endif

              if has("cscope") && filereadable("/usr/bin/cscope")
              set csprg=/usr/bin/cscope
              set csto=0
              set cst
              set nocsverb
              " add any database in current directory
              if filereadable("cscope.out")
              cs add cscope.out
              " else add database pointed to by environment
              elseif $CSCOPE_DB != ""
              cs add $CSCOPE_DB
              endif
              set csverb
              endif

              " Switch syntax highlighting on, when the terminal has colors
              " Also switch on highlighting the last used search pattern.
              if &t_Co > 2 || has("gui_running")
              syntax on
              set hlsearch
              endif

              filetype plugin on

              if &term=="xterm"
              set t_Co=8
              set t_Sb=?[4%dm
              set t_Sf=?[3%dm
              endif

              " Don't wake up system with blinking cursor:
              " http://www.linuxpowertop.org/known.php
              let &guicursor = &guicursor . ",a:blinkon0"

              =====================End .vimrc=====================================

              --Farid

              --
              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
            • Tony Mechelynck
              On 03/10/11 06:15, Ismail, Mohd F. wrote: [...] ... [...] That s clear enough: the ruler functionality was excluded at compile-time. But I m curious: try
              Message 6 of 11 , Oct 3, 2011
              • 0 Attachment
                On 03/10/11 06:15, Ismail, Mohd F. wrote:
                [...]
                > When I type :verbose set ruler?, I got, at the bottom left corner, in red background E519: Option not supported: ruler?
                [...]

                That's clear enough: the 'ruler' functionality was excluded at compile-time.

                But I'm curious: try running

                vim --version > vim-version.txt

                then pasting the file vim-version.txt in an email. Then we'll have a
                better idea of how you can get a Vim version which includes that
                functionality.


                Best regards,
                Tony.
                --
                Do not meddle in the affairs of troff, for it is subtle and quick to
                anger.

                --
                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
              • Ismail, Mohd F.
                ________________________________________ From: Tony Mechelynck [antoine.mechelynck@gmail.com] Sent: Monday, October 03, 2011 6:52 PM To: Ismail, Mohd F. Cc:
                Message 7 of 11 , Oct 6, 2011
                • 0 Attachment
                  ________________________________________
                  From: Tony Mechelynck [antoine.mechelynck@...]
                  Sent: Monday, October 03, 2011 6:52 PM
                  To: Ismail, Mohd F.
                  Cc: vim_use@...
                  Subject: Re: Vim 7.2 on CentOS 6 - set ruler has no effect

                  On 03/10/11 06:15, Ismail, Mohd F. wrote:
                  [...]
                  > When I type :verbose set ruler?, I got, at the bottom left corner, in red background E519: Option not supported: ruler?
                  [...]

                  That's clear enough: the 'ruler' functionality was excluded at compile-time.

                  But I'm curious: try running

                  vim --version > vim-version.txt

                  then pasting the file vim-version.txt in an email. Then we'll have a
                  better idea of how you can get a Vim version which includes that
                  functionality.


                  Best regards,
                  Tony.
                  --
                  Do not meddle in the affairs of troff, for it is subtle and quick to
                  anger.





                  Here it is. I'll compile my own version then. Is there a guide on what's best option to include?


                  VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jun 25 2011 09:43:11)
                  Included patches: 1-411
                  Modified by <bugzilla@...>
                  Compiled by <bugzilla@...>
                  Huge version without GUI. Features included (+) or not (-):
                  +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
                  -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
                  +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
                  +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
                  +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
                  +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
                  +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm
                  -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
                  +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra +perl +postscript
                  +printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind
                  +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax
                  +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
                  +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual
                  +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup
                  -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
                  system vimrc file: "/etc/vimrc"
                  user vimrc file: "$HOME/.vimrc"
                  user exrc file: "$HOME/.exrc"
                  fall-back for $VIM: "/usr/share/vim"
                  Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -I/usr/include/python2.6 -pthread
                  Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -L/usr/local/lib -o vim -lselinux -lncurses -lacl -lgpm -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lutil -lc -L/usr/lib64/python2.6/config -lpython2.6 -lutil -lm -Xlinker -export-dynamic


                  --Farid

                  --
                  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
                • Christian Brabandt
                  Hi Ismail,! ... [...] ... Are you sure, this is the same version which has the problem. set ruler should work just find from this version. Could it be, there
                  Message 8 of 11 , Oct 6, 2011
                  • 0 Attachment
                    Hi Ismail,!

                    On Do, 06 Okt 2011, Ismail, Mohd F. wrote:

                    >
                    > Here it is. I'll compile my own version then. Is there a guide on what's best option to include?
                    >
                    >
                    [...]
                    > Huge version without GUI. Features included (+) or not (-):
                    > +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
                    > -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments

                    Are you sure, this is the same version which has the problem. set ruler
                    should work just find from this version. Could it be, there is another
                    vim in your path, may be a tiny vim or you called it vi? Try :version
                    from within the vim, that has the problem and look for +cmdline_info
                    (enabled ruler feature) or -cmdline_info (disbaled ruler feature)

                    regards,
                    Christian

                    --
                    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
                  • Tony Mechelynck
                    ... On RedHat and similar systems, you may have several Vim executables installed: /bin/vi is a minimal version with no arithmetic evaluation, no syntax
                    Message 9 of 11 , Oct 13, 2011
                    • 0 Attachment
                      On 08/10/11 05:39, Ismail, Mohd F. wrote:
                      >
                      > From: Christian Brabandt<cbli...@...>
                      > Date: Thu, 6 Oct 2011 20:11:31 +0200
                      > Local: Thurs, Oct 6 2011 1:11 pm
                      > Subject: Re: Vim 7.2 on CentOS 6 - set ruler has no effect
                      > Print | Individual message | Show original | Report this message | Find messages by this author
                      > Hi Ismail,!
                      >
                      > On Do, 06 Okt 2011, Ismail, Mohd F. wrote:
                      >
                      >> Here it is. I'll compile my own version then. Is there a guide on what's best option to include?
                      >
                      > [...]
                      >> Huge version without GUI. Features included (+) or not (-):
                      >> +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
                      >> -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
                      >
                      > Are you sure, this is the same version which has the problem. set ruler
                      > should work just find from this version. Could it be, there is another
                      > vim in your path, may be a tiny vim or you called it vi? Try :version
                      > from within the vim, that has the problem and look for +cmdline_info
                      > (enabled ruler feature) or -cmdline_info (disbaled ruler feature)
                      >
                      > regards,
                      > Christian
                      >
                      > Hi Christian,
                      >
                      > You're right. There are /bin/vi and /usr/bin/vim. vim is the one with set ruler that works fine, while vi doesn't show that. Thank you for pointing that out.
                      >
                      > --Farid
                      >

                      On RedHat and similar systems, you may have several Vim executables
                      installed:

                      /bin/vi is a "minimal" version with no arithmetic evaluation, no syntax
                      highlighting, no ruler, no split-windows, no multibyte support, etc. Its
                      only advantage is that it is guaranteed to be on a filesystem which is
                      always "mounted" even when running the system in single-user
                      emergency-repairs mode (runlevel 1 or S) and even if /usr is on
                      different filesystem which, in that case, may be left unmounted.

                      /usr/bin/vim is a normal version with most functionalities but no GUI.

                      /usr/X11R6/bin/gvim is a full-fledged executable with GUI. It can also
                      run in a terminal if the X server is not accessible or if invoked with
                      the -v command-line switch or from a "vim" softlink.

                      Since they come from distinct packages you may have one, two or all
                      three of them installed.


                      Best regards,
                      Tony.
                      --
                      There are times when truth is stranger than fiction and lunch time is
                      one of them.

                      --
                      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
                    Your message has been successfully submitted and would be delivered to recipients shortly.