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

Re: automatic * on

Expand Messages
  • Pavel Tavoda
    ... set formatoptions=tcqro set comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n: ,fb:- ... and then start comment your file /* and magic appear. It also work
    Message 1 of 2 , Sep 6, 2001
    • 0 Attachment
      Try this:
      ---------------------------------
      set formatoptions=tcqro
      set comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
      ---------------------------------
      and then start comment your file "/*" and magic appear.
      It also work nice with 'o' command.

      Pavel

      Matthew John Giblett wrote:

      >while programming i've got these two mappings for java
      >map! ]sc <ESC>g0i/<ESC>63a*<ESC>:set tw=64<CR>o
      >map! ]ec <ESC>o<ESC>g0i/<ESC>63i*<ESC>:set tw=0<CR>o
      >start comment and end comment
      >what i'd like to do is add in a mapping so that every time i type an enter
      >it will put in an end line
      >followed by a star and a white space
      >now i was going to do something like
      >map! <CR> <ESC>o*<TAB>
      >to do this but this i realised is a bit shoddy and if i do it that way i
      >won't broaden my horizon's :)
      >
      >thanks anyone who can help
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.