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

Problem sourcing .vimrc file

Expand Messages
  • Jeffery Small
    I am on a Solaris 10 system using vim version 7.2.148. I have my master vimrc file identified by the environment variable VIMINIT and I also have a local
    Message 1 of 3 , Oct 29, 2010
      I am on a Solaris 10 system using vim version 7.2.148.

      I have my master vimrc file identified by the environment variable VIMINIT
      and I also have a local .vimrc file in the current directory. When I begin
      editing a file in this directory, the custom commands in the local .vimrc
      file are read. However, if I edit the .vimrc file in another window and
      then source the file from my editing session with:

      :source .vimrc

      the changes are not read! Now, I have been doing this for many years and it
      always worked fine, so what is the problem now? I tried specifying:

      :source ./.vimrc
      :source <full_directory_path>/.vimrc

      and neither of these worked. However, if I exit the editing session and
      restart vim, then the changes are seen upon startup!

      It appears as though the source command is not working. Is this a bug in
      this version of vim? Is there a new "feature" that I need to properly set
      that might be denying source from working? Is there a workaround for this?
      Thanks for any help you can offer.

      Regards,
      --
      Jeff

      C. Jeffery Small
      jeff@...

      --
      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
    • Erik Falor
      ... Neither of these will work unless the Vim process s CWD is the directory where your .vimrc is stored. That, of course, should be $HOME, and you can query
      Message 2 of 3 , Oct 29, 2010
        On Fri, Oct 29, 2010 at 06:29:26PM +0000, Jeffery Small wrote:
        > I am on a Solaris 10 system using vim version 7.2.148.
        >
        > I have my master vimrc file identified by the environment variable VIMINIT
        > and I also have a local .vimrc file in the current directory. When I begin
        > editing a file in this directory, the custom commands in the local .vimrc
        > file are read. However, if I edit the .vimrc file in another window and
        > then source the file from my editing session with:
        >
        > :source .vimrc
        >
        > the changes are not read! Now, I have been doing this for many years and it
        > always worked fine, so what is the problem now? I tried specifying:
        >
        > :source ./.vimrc

        Neither of these will work unless the Vim process's CWD is the
        directory where your .vimrc is stored. That, of course, should be
        $HOME, and you can query the CWD with the :pwd command. It could be
        the case that you have 'autochdir' set to true. See :help 'autochdir'
        for more details.

        That said,

        > :source <full_directory_path>/.vimrc

        should work, provided that you spelled <full_directory_path>
        correctly.

        > and neither of these worked. However, if I exit the editing session and
        > restart vim, then the changes are seen upon startup!
        >
        > It appears as though the source command is not working. Is this a bug in
        > this version of vim? Is there a new "feature" that I need to properly set
        > that might be denying source from working? Is there a workaround for this?
        > Thanks for any help you can offer.

        The version of Vim that you're running is probably two years old. The
        current version is 7.3.47. I don't know this off the top of my head,
        but it could be a bug that has subsequently been fixed. You could
        look at the patches section on www.vim.org to see if a patch was
        submitted that fixes your problem.

        At any rate, if it is possible to do so, I recommend that you upgrade
        to 7.3.

        --
        Erik Falor
        Registered Linux User #445632 http://counter.li.org
      • Jeffery Small
        ... Thanks Erik. I am using the copy of vim from the openCSW group, and this is their latest version. I ll see if I can goose someone to build/release the
        Message 3 of 3 , Oct 29, 2010
          Erik Falor <ewfalor@...> writes:

          >At any rate, if it is possible to do so, I recommend that you upgrade
          >to 7.3.

          Thanks Erik. I am using the copy of vim from the openCSW group, and this is
          their latest version. I'll see if I can goose someone to build/release the
          current version.

          Regards,
          --
          Jeff

          --
          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.