in reply to multi line comments?

If this is a typing issue (i.e. it's a pain typing in '#' at the start of each line, and you'd like to reformat/reflow your comments on demand without having to add/remove the '#'s by hand), you may want to look into an editor that does most of this work for you. Emacs works well for me, but I'm sure others (e.g. vim) do this as well. Some editors also colorize comments which helps them stand out. For me, this solves 90% of the problem of not having multiline comments, and keeps me from doing stupid stuff (like accidently commenting sections of real code).

bluto

Replies are listed 'Best First'.
Re: Re: multi line comments?
by CukiMnstr (Deacon) on Jun 16, 2003 at 21:02 UTC
    When editing perl code in vim, if you comment a line the following lines are commented, so you kind of get multi-line comments for free ;)
    If you want to comment a block of code, there are many plugins to do this, for example this one.

    hope this helps,

    update: first paragraph added, and rephrased second one.

      Of course besides plugins, you can use visual selection mode (:help visual) which is esp useful with the { and } keys to move paragraph-wise. You can either use I to insert the hashes at the front or something like :'<,'>s/^/# (the '<,'> is automatically added as soon as you type the double colon). Visual block selection mode (:help block) makes getting rid of the hashes a breeze - move cursor to top hash, Ctrl-v, } to jump to the end of the paragraph, adjust width of block if necessary, d.

      Makeshifts last the longest.