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

Re: behaviour of commenting

Expand Messages
  • Robert Cussons
    Thanks for all the help, especially Chris. I need step by step instructions normally, as I don t have a clue what I m doing! :-) All works how I want it now.
    Message 1 of 11 , Mar 31, 2006
      Thanks for all the help, especially Chris. I need step by step
      instructions normally, as I don't have a clue what I'm doing! :-)
      All works how I want it now. Amazing how these little things can drive
      you mad.

      Chris Allen wrote:
      > On 3/30/06, Robert Cussons <r.cussons@...> wrote:
      >>Thanks for that, worth knowing for future reference. It was as you
      >>suggested being set in a system wide file
      > I thought it would be.
      >>the problem being that I can't set this as it is a works computer and I
      >>am not logged in and cannot login as root. I read the thread you
      >>suggested, but I didn't really understand it! I think the autocommand
      >>option may be the only option as I can't change the file directly (which
      >>is what I'd prefer to do), but I don't understand what this autocommand
      >>does!! Any pointers?
      > Right, well, I'll break it down into small steps for you. I'm
      > assuming your on a Unix-like system, but you can modify the
      > instructions for Windows fairly easily, I'm sure.
      > First, ensure that formatoptions is set as you like it in your ~/.vimrc file
      > Create a directory ~/.vim/after/ftplugin
      > Create a file within that named c.vim which contains the following single line;
      > setlocal formatoptions<
      > That should do you.
      > The after directory is Vim's built-in method for over-riding the
      > default settings bundled with vim. You can use the after-directory
      > with any sort of plugin, such as ftplugin, done above, indent, or
      > syntax.
      > The strange setlocal statement there, trailed by a < means "set the
      > local value to the current global value". You've specified the global
      > value in your personal .vimrc file, and this just resets the
      > buffer-local value of it, which was changed by c.vim, back to your
      > original.
      > HTH,
      > Chris Allen

      Robert Cussons
      Office SB3 3.163, Theory Group
      Gesellschaft für Schwerionenforschung mbH (GSI)
      Planckstraße 1
      64291 Darmstadt

      Tel: +49 (0)6159 71 2754
      E-mail: r.cussons@...
    Your message has been successfully submitted and would be delivered to recipients shortly.