Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2 by [email protected]: Handle the offset for the end of a three-piece comment ignored
http://code.google.com/p/vim/issues/detail?id=2

:help format-comments mentions that it is possible to specify an offset for the end of a three-piece comment:

  {digits}
        When together with 's' or 'e': add {digit} amount of offset to an
        automatically inserted middle or end comment leader. The offset begins
        from a left alignment. See below for more details.

  -{digits}
        Like {digits} but reduce the indent.  This only works when there is
        some indent for the start or end part that can be removed.




This seems to have never been implemented. If you are interested in implementing the feature, I made a small first step: I modified insertchar() in edit.c so that the closing part is correctly indented (with the offset) when the auto-close comment functionality is triggered but:
• my solution uses spaces – it does not take into account the value of
  'et', 'ts', etc.,
• get_c_indent() does not handle the offset setting.

If you decide to implement this, at least the settings mentioned above will have to be considered (perhaps other as well).

You might have a look at the attached patch (against Vim 7.3.189) if you'd like a pointer to where to start. Also have a look at open_line().

Attachments:
        three-piece-comment-end-offset.patch  1.7 KB

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui