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

Re: Re (OOPS): Unable to get syntax highlighting to work for root account

Expand Messages
  • Tony Mechelynck
    ... The reason root doesn t use that alias is because /bin is guaranteed to be always mounted when your system is running, even in single-user
    Message 1 of 9 , Mar 1, 2008
      YGirouard wrote:
      >
      > Ok, I fixed it... all I had to do was to add an alias for vi pointing to
      > /usr/bin/vim in my /root/.bashrc file. Root was using /bin/vi which is the
      > Small version, while other accounts were aliasing vi as vim, which is why it
      > was working... I was also able to get syntax to work as root by using just
      > "vim filename" instead of vi... Silly me... Thanks for pointing me in the
      > right direction Tony! :)

      The reason root doesn't use that alias is because /bin is guaranteed to be
      always mounted when your system is running, even in single-user
      emergency-repairs runlevel, and even if /usr is on a different partition,
      which might be left unmounted in that case.

      What I recommend is not to set up that alias, but instead to teach yourself to
      invoke vim as vim (not vi) whenever you want "big" capabilities such as syntax
      highlighting (and /usr is mounted). That way, if someday you find yourself
      trying to do emergency repairs on a Red Hat system (not necessarily this one),
      you'll know that if "vim" isn't on a mounted volume, you can invoke a minimum
      vim version as "vi" -- while for normal editing purposes on a fully-running
      system, "vim" will give you what you want.


      Best regards,
      Tony.
      --
      You need no longer worry about the future. This time tomorrow you'll
      be dead.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.