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

how to indent-region

Expand Messages
  • Lechee.Lai
    hi, how to indent-region or beautiful code for current buffer, also good comment for region, does it already inside me Thanks lechee
    Message 1 of 3 , Dec 17, 2009
    • 0 Attachment
      hi,
      how to indent-region or beautiful code for current buffer, also good comment for region, does it already inside "me"

      Thanks
      lechee
    • Steven Phillips
      Lechee, For a fixed indent increase use indent-increase (main menu - Format - Increase Indent) To reformat a region using the buffers auto-indent rules use
      Message 2 of 3 , Dec 17, 2009
      • 0 Attachment
        Lechee,

        For a fixed indent increase use indent-increase (main menu -> Format -> Increase Indent)

        To reformat a region using the buffers auto-indent rules use restyle-region (main menu -> Format -> Restyle region)

        The is no simple way of commenting out a region of code as most languages do not handle comments within comments (i.e. if the region already has a comment then simply wrapping the region in a comment fails). wrapping the code in pre-processor '#if 0 .... #endif' is the best solution if supported by the language.

        Steve

        Lechee.Lai wrote:
         

        hi,
        how to indent-region or beautiful code for current buffer, also good comment for region, does it already inside "me"

        Thanks
        lechee

      • Lechee.Lai
        thanks indeed Steven :-)
        Message 3 of 3 , Dec 17, 2009
        • 0 Attachment
          thanks indeed Steven :-)

          --- In jasspa@yahoogroups.com, Steven Phillips <bill@...> wrote:
          >
          > Lechee,
          >
          > For a fixed indent increase use indent-increase (main menu -> Format ->
          > Increase Indent)
          >
          > To reformat a region using the buffers auto-indent rules use
          > restyle-region (main menu -> Format -> Restyle region)
          >
          > The is no simple way of commenting out a region of code as most
          > languages do not handle comments within comments (i.e. if the region
          > already has a comment then simply wrapping the region in a comment
          > fails). wrapping the code in pre-processor '#if 0 .... #endif' is the
          > best solution if supported by the language.
          >
          > Steve
          >
          > Lechee.Lai wrote:
          > >
          > >
          > > hi,
          > > how to indent-region or beautiful code for current buffer, also good
          > > comment for region, does it already inside "me"
          > >
          > > Thanks
          > > lechee
          > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.