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

Macro / Function to draw a set of characters below the line above

Expand Messages
  • Keith Christian
    Hello, Vim Users, I m writing a fair amount of documentation in Asciidoc these days. When entering a major section s title, a row of equal signs, tlides,
    Message 1 of 4 , Nov 11, 2012
    • 0 Attachment
      Hello, Vim Users,

      I'm writing a fair amount of documentation in Asciidoc these days.
      When entering a major section's title, a row of equal signs, tlides,
      dashes, or carets equal to the length of the line of text above (or
      within two or three of the exact length) must be entered so that the
      line is recognized as a section title.


      Example:


      This is a section title, and the row of equal signs below it must be
      of the same length as this text
      ====================================================================================================


      I'm looking for a function to do this to reduce the tedium. Would
      like to bind this new function to a key so it's quick to execute, say,
      Ctrl-F1 or some such.

      Ideas appreciated.

      Keith

      --
      You received this message from the "vim_use" 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
    • Dominique PellĂ©
      On Sun, Nov 11, 2012 at 11:21 PM, Keith Christian ... Hi Keith See this tip: http://vim.wikia.com/wiki/VimTip750 -- Dominique -- You received this message from
      Message 2 of 4 , Nov 11, 2012
      • 0 Attachment
        On Sun, Nov 11, 2012 at 11:21 PM, Keith Christian
        <keith1christian@...> wrote:
        > Hello, Vim Users,
        >
        > I'm writing a fair amount of documentation in Asciidoc these days.
        > When entering a major section's title, a row of equal signs, tlides,
        > dashes, or carets equal to the length of the line of text above (or
        > within two or three of the exact length) must be entered so that the
        > line is recognized as a section title.
        >
        >
        > Example:
        >
        >
        > This is a section title, and the row of equal signs below it must be
        > of the same length as this text
        > ====================================================================================================
        >
        >
        > I'm looking for a function to do this to reduce the tedium. Would
        > like to bind this new function to a key so it's quick to execute, say,
        > Ctrl-F1 or some such.
        >
        > Ideas appreciated.
        >
        > Keith

        Hi Keith

        See this tip:

        http://vim.wikia.com/wiki/VimTip750

        -- Dominique

        --
        You received this message from the "vim_use" 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
      • Chris Lott
        On Sun, Nov 11, 2012 at 1:21 PM, Keith Christian ... You could also check out SnipMate -- there are snippets for Markdown and Pandoc that do exactly this for
        Message 3 of 4 , Nov 11, 2012
        • 0 Attachment
          On Sun, Nov 11, 2012 at 1:21 PM, Keith Christian
          <keith1christian@...> wrote:
          > Example:
          >
          >
          > This is a section title, and the row of equal signs below it must be
          > of the same length as this text
          > ====================================================================================================
          >
          >
          > I'm looking for a function to do this to reduce the tedium. Would
          > like to bind this new function to a key so it's quick to execute, say,
          > Ctrl-F1 or some such.

          You could also check out SnipMate -- there are snippets for Markdown
          and Pandoc that do exactly this for top level (=) and second level (-)
          "headers."

          c
          --
          Chris Lott <chris@...>

          --
          You received this message from the "vim_use" 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
        • Keith Christian
          Ok Dominique, Chris: Thanks, I think those references will do the job. Appreciate the feedback. Keith -- You received this message from the vim_use maillist.
          Message 4 of 4 , Nov 12, 2012
          • 0 Attachment
            Ok Dominique, Chris:

            Thanks, I think those references will do the job.

            Appreciate the feedback.

            Keith

            --
            You received this message from the "vim_use" 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
          Your message has been successfully submitted and would be delivered to recipients shortly.