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

Problems in linux w Windows _vimrc

Expand Messages
  • David Turetsky
    I am running vim 6.1 (2002 Mar 24) under Windows XP, and vim 6.1.18 under linux 3.0r1 (Woody)   I love my vimrc under windows, which starts with Bram’s
    Message 1 of 9 , Feb 27, 2003
      I am running vim 6.1 (2002 Mar 24) under Windows XP, and vim 6.1.18
      under linux 3.0r1 (Woody)
       
      I love my vimrc under windows, which starts with Bram’s example vimrc,
      add’s Jeff Kinzli’s potpourri of nice additions, and also includes
      colormenu.vim by Geoff Reedy
       
      When I pasted the Windows vimrc onto the tail end of the vimrc that
      comes with the woody distribution, I got color highlighting, but vim
      opens up with a long list of complaints to the shell
       
      I’ve been commenting out segments, but though even commented out, vim
      complains about the code as though the comment (“) wasn’t even there
       
      I’ve got a bunch of ‘Not an editor command: ^M (yes, I know, this is a
      carriage return), and things like ‘E15: Invalid expression:
      globpath(&rtp, “colors/*.vim”)^M
       
      The latter occurs even though I first changed the variable in globpath
      to “/usr/vim/colors/*.vim” which I had set up and installed all of the
      colorscheme files I got from the php list
       
      Even though I’ve then commented that line out and similarly commented
      out ‘bs=2^M’ and ‘ch=2^M’, it keeps complaining
       
      Any insights?
       
      --
      David
    • Benji Fisher
      ... With luck, that should solve at least the ^M problems. If there are still problems, try to cut down the file so that you get only a few errors, and then
      Message 2 of 9 , Feb 27, 2003
        David Turetsky wrote:
        > I am running vim 6.1 (2002 Mar 24) under Windows XP, and vim 6.1.18
        > under linux 3.0r1 (Woody)
        >
        > I love my vimrc under windows, which starts with Bram’s example vimrc,
        > add’s Jeff Kinzli’s potpourri of nice additions, and also includes
        > colormenu.vim by Geoff Reedy
        >
        > When I pasted the Windows vimrc onto the tail end of the vimrc that
        > comes with the woody distribution, I got color highlighting, but vim
        > opens up with a long list of complaints to the shell
        >
        > I’ve been commenting out segments, but though even commented out, vim
        > complains about the code as though the comment (“) wasn’t even there
        >
        > I’ve got a bunch of ‘Not an editor command: ^M (yes, I know, this is a
        > carriage return), and things like ‘E15: Invalid expression:
        > globpath(&rtp, “colors/*.vim”)^M
        >
        > The latter occurs even though I first changed the variable in globpath
        > to “/usr/vim/colors/*.vim” which I had set up and installed all of the
        > colorscheme files I got from the php list
        >
        > Even though I’ve then commented that line out and similarly commented
        > out ‘bs=2^M’ and ‘ch=2^M’, it keeps complaining
        >
        > Any insights?

        First, make sure that you have unix-style line endings:

        :set ft=unix
        :w

        With luck, that should solve at least the ^M problems. If there are still
        problems, try to cut down the file so that you get only a few errors, and then
        try to figure out what is going wrong.

        HTH --Benji Fisher
      • Mikolaj Machowski
        ... Mikolaj
        Message 3 of 9 , Feb 28, 2003
          On Thu, Feb 27, 2003 at 09:46:22PM -0500, Benji Fisher wrote:
          > First, make sure that you have unix-style line endings:
          > :set ft=unix

          :set ff=unix

          > :w
          > With luck, that should solve at least the ^M problems. If there are still
          > problems, try to cut down the file so that you get only a few errors, and
          > then try to figure out what is going wrong.

          Mikolaj
        • Antoine J. Mechelynck
          ... You have an and-of-line problem: Lines are ended with CR+NL in Dos/Windows, only NL in Unix. The carriage-return appears under unix as a Ctrl-M. IIRC, the
          Message 4 of 9 , Feb 28, 2003
            David Turetsky <davidturetsky@...> wrote:
            > I am running vim 6.1 (2002 Mar 24) under Windows XP, and vim 6.1.18
            > under linux 3.0r1 (Woody)
            >
            > I love my vimrc under windows, which starts with Bram's example vimrc,
            > add's Jeff Kinzli's potpourri of nice additions, and also includes
            > colormenu.vim by Geoff Reedy
            >
            > When I pasted the Windows vimrc onto the tail end of the vimrc that
            > comes with the woody distribution, I got color highlighting, but vim
            > opens up with a long list of complaints to the shell
            >
            > I've been commenting out segments, but though even commented out, vim
            > complains about the code as though the comment (") wasn't even there
            >
            > I've got a bunch of 'Not an editor command: ^M (yes, I know, this is a
            > carriage return), and things like 'E15: Invalid expression:
            > globpath(&rtp, "colors/*.vim")^M
            >
            > The latter occurs even though I first changed the variable in globpath
            > to "/usr/vim/colors/*.vim" which I had set up and installed all of the
            > colorscheme files I got from the php list
            >
            > Even though I've then commented that line out and similarly commented
            > out 'bs=2^M' and 'ch=2^M', it keeps complaining
            >
            > Any insights?
            >
            > --
            > David

            You have an and-of-line problem: Lines are ended with CR+NL in Dos/Windows,
            only NL in Unix. The carriage-return appears under unix as a Ctrl-M.

            IIRC, the cure is to explicitly load it as a dos file, then save it as a
            Unix file, as follows:

            :e ++ff=dos vimrc
            :w ++ff=unix

            HTH,
            Tony.
          • David Turetsky
            I cut back /etc/vim/vimrc to the core minimum, :set ft=unix, and slowly added back the enhancements I have operating under Windows XP. Runs perfectly, with no
            Message 5 of 9 , Feb 28, 2003
              I cut back /etc/vim/vimrc to the core minimum, :set ft=unix, and slowly
              added back the enhancements I have operating under Windows XP. Runs
              perfectly, with no error messages

              Apparently the balance of the problems must have come from poor splicing
              in of the addons in my initial effort

              Under windows the colormenu coding adds a dropdown menu to the window
              bar. Under linux, using either xterm or a gnome terminal window, this
              does not happen. Any idea whether this can be addressed?

              As a workaround I put all the colormenu routines I downloaded from the
              vim website into /var/share/vim/vim61/colors and I am able to select
              from among them with :colorscheme <TAB>

              --
              David

              -----Original Message-----
              From: Benji Fisher [mailto:benji@...]
              Sent: Thursday, February 27, 2003 9:46 PM
              To: David Turetsky
              Cc: vim@...
              Subject: Re: Problems in linux w Windows _vimrc

              David Turetsky wrote:
              > I am running vim 6.1 (2002 Mar 24) under Windows XP, and vim 6.1.18
              > under linux 3.0r1 (Woody)
              >
              > I love my vimrc under windows, which starts with Bram's example vimrc,
              > add's Jeff Kinzli's potpourri of nice additions, and also includes
              > colormenu.vim by Geoff Reedy
              >
              > When I pasted the Windows vimrc onto the tail end of the vimrc that
              > comes with the woody distribution, I got color highlighting, but vim
              > opens up with a long list of complaints to the shell
              >
              > I've been commenting out segments, but though even commented out, vim
              > complains about the code as though the comment (") wasn't even there
              >
              > I've got a bunch of 'Not an editor command: ^M (yes, I know, this is a
              > carriage return), and things like 'E15: Invalid expression:
              > globpath(&rtp, "colors/*.vim")^M
              >
              > The latter occurs even though I first changed the variable in globpath
              > to "/usr/vim/colors/*.vim" which I had set up and installed all of the
              > colorscheme files I got from the php list
              >
              > Even though I've then commented that line out and similarly commented
              > out 'bs=2^M' and 'ch=2^M', it keeps complaining
              >
              > Any insights?

              First, make sure that you have unix-style line endings:

              :set ft=unix
              :w

              With luck, that should solve at least the ^M problems. If there are
              still
              problems, try to cut down the file so that you get only a few errors,
              and then
              try to figure out what is going wrong.

              HTH --Benji Fisher
            • Dan Sharp
              ... Sounds like you are using the GUI Vim under Windows and the console Vim under Linux. The console version of Vim does not use menus. You will need to run
              Message 6 of 9 , Feb 28, 2003
                David Turetsky wrote:
                >
                > Under windows the colormenu coding adds a dropdown menu to the window
                > bar. Under linux, using either xterm or a gnome terminal window, this
                > does not happen. Any idea whether this can be addressed?

                Sounds like you are using the GUI Vim under Windows and the console Vim
                under Linux. The console version of Vim does not use menus. You will
                need to run gvim (or vim -g) on Linux to get a GUI Vim that supports
                menus. Running in a terminal program will not do it.

                Dan Sharp
              • Antoine J. Mechelynck
                ... To use menus in console vim, see ... HTH, Tony.
                Message 7 of 9 , Feb 28, 2003
                  Dan Sharp <dwsharp@...> wrote:
                  > David Turetsky wrote:
                  > >
                  > > Under windows the colormenu coding adds a dropdown menu to the
                  > > window bar. Under linux, using either xterm or a gnome terminal
                  > > window, this does not happen. Any idea whether this can be
                  > > addressed?
                  >
                  > Sounds like you are using the GUI Vim under Windows and the console
                  > Vim under Linux. The console version of Vim does not use menus. You
                  > will need to run gvim (or vim -g) on Linux to get a GUI Vim that
                  > supports menus. Running in a terminal program will not do it.
                  >
                  > Dan Sharp

                  To use menus in console vim, see
                  :help console-menus

                  HTH,
                  Tony.
                • David Turetsky
                  ... I am running vim 6.1 (2002 Mar 24) under Windows XP, and vim 6.1.18 under linux 3.0r1 (Woody) I love my vimrc under windows, which starts with Bram s
                  Message 8 of 9 , Feb 28, 2003
                    >>> David Turetsky bemoans:

                    I am running vim 6.1 (2002 Mar 24) under Windows XP, and vim 6.1.18
                    under linux 3.0r1 (Woody)

                    I love my vimrc under windows, which starts with Bram's example
                    vimrc, add's Jeff Kinzli's potpourri of nice additions, and also
                    includes colormenu.vim by Geoff Reedy

                    When I pasted the Windows vimrc onto the tail end of the vimrc that
                    comes with the woody distribution, I got color highlighting, but vim
                    opens up with a long list of complaints to the shell

                    I've been commenting out segments, but though even commented out, vim
                    complains about the code as though the comment (") wasn't even there

                    I've got a bunch of 'Not an editor command: ^M (yes, I know, this is
                    a carriage return), and things like 'E15: Invalid expression:
                    globpath(&rtp, "colors/*.vim")^M

                    The latter occurs even though I first changed the variable in
                    globpath to "/usr/vim/colors/*.vim" which I had set up and installed
                    all of the colorscheme files I got from the php list

                    Even though I've then commented that line out and similarly commented
                    out 'bs=2^M' and 'ch=2^M', it keeps complaining

                    Any insights?


                    >>> Benji Fisher

                    First, make sure that you have unix-style line endings:

                    :set ft=unix
                    :w

                    With luck, that should solve at least the ^M problems. If there are
                    still problems, try to cut down the file so that you get only a few
                    errors, and then try to figure out what is going wrong.

                    HTH --Benji Fisher


                    >>> David: Progress and workaround:

                    From: David Turetsky [mailto:davidturetsky@...]
                    Sent: Friday, February 28, 2003 2:01 PM
                    To: vim@...
                    Subject: RE: Problems in linux w Windows _vimrc

                    I cut back /etc/vim/vimrc to the core minimum, :set ft=unix, and
                    slowly
                    added back the enhancements I have operating under Windows XP. Runs
                    perfectly, with no error messages

                    Apparently the balance of the problems must have come from poor
                    splicing
                    in of the addons in my initial effort

                    Under windows the colormenu coding adds a dropdown menu to the window
                    bar. Under linux, using either xterm or a gnome terminal window, this
                    does not happen. Any idea whether this can be addressed?

                    As a workaround I put all the colormenu routines I downloaded from
                    the
                    vim website into /var/share/vim/vim61/colors and I am able to select
                    from among them with :colorscheme <TAB>


                    >>> David: Finally, resolution:

                    Exploring this issue further, I see that ALL of the symptoms appear
                    when
                    either vimrc or color.vim format files are stored in dos format. This
                    includes all of the superfluous ^M's attached at the end of files and
                    the slew of error messages.

                    The cure is simply :set fileformat=unix. Set ft=unix also clears the
                    problem, but removes the color rendition until that file is reopened
                  • Antoine J. Mechelynck
                    David Turetsky wrote: [...] ... ft = filetype ff = fileformat (can be overridden by :edit ++ff filename) I don t know what kind
                    Message 9 of 9 , Feb 28, 2003
                      David Turetsky <davidturetsky@...> wrote:
                      [...]
                      > The cure is simply :set fileformat=unix. Set ft=unix also clears
                      > the problem, but removes the color rendition until that file is
                      > reopened

                      ft = filetype
                      ff = fileformat (can be overridden by :edit ++ff filename)

                      I don't know what kind of a filetype "unix" is. I believe it was a typo on
                      the part of whoever recommended setting ft to unix.

                      Tony.
                    Your message has been successfully submitted and would be delivered to recipients shortly.