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

Re: Formatting help files

Expand Messages
  • Stahlman Family
    ... Pablo, I actually got quite far along toward the release of Txtfmt version 3.0, which adds visual map capability, before getting a bit sidetracked. The
    Message 1 of 32 , Jun 1, 2010
      Pablo Giménez wrote:
      > 2010/5/28 Stahlman Family <brettstahlman@...>
      >
      >> Pablo Giménez wrote:
      >>
      >>> Hi.
      >>> I have some help files along with my scripts and I wanto give them a
      >>> better
      >>> formatting.
      >>> So far the text layout is not too bad, but I am wondering is there is
      >>> anyway to make some letter to appear as bold or italic, like when you
      >>> write
      >>> a wiki.
      >>> Is this possible with vim help files format????
      >>>
      >> Pablo,
      >> You might have a look at the following plugin:
      >>
      >> Txtfmt (The Vim Highlighter)
      >> http://www.vim.org/scripts/script.php?script_id=2208
      >>
      > the plubing is really useful, thanks.
      > One question how I can use a foramting symbol just in the selected area in
      > viasual mode.
      > For instance I select some text in visual mode and then I want to apply a
      > bold format only to this area. There is any mapping that will enter the
      > prompt for format option apply them, and at the end of the selection add a
      > nonformat character?

      Pablo,
      I actually got quite far along toward the release of Txtfmt version 3.0,
      which adds visual map capability, before getting a bit sidetracked. The
      amount of user interest I've seen in this feature leads me to believe
      that it might be a good place to focus my efforts... In the meantime,
      note that Txtfmt provides a very powerful and flexible "User Map"
      feature, which allows you to create macros that combine Txtfmt
      operations (e.g., insert token/jump to token) with arbitrary Vim
      commands to perform complex sequences with just a keystroke or two.

      :help txtfmt-user-maps

      The mechanism is very powerful (and perhaps for that reason, a bit
      daunting to new users of the plugin); however, I've included a number of
      examples in the documentation, which should help to illustrate how it
      might be used. You might even be able to copy some of the examples to
      your .vimrc and use them as-is, or as a starting point for your own
      maps. If you get stuck, I'm always glad to help...

      :help txtfmt-user-map-examples

      Sincerely,
      Brett Stahlman

      > cheers
      >
      >> Txtfmt can be used either as a standalone filetype, or in conjunction with
      >> other filetypes (e.g., Vim "help"), to beautify your documents with word
      >> processor style highlighting. Txtfmt allows you to create arbitrary regions
      >> involving any combination of bold, underline, italic, etc..., as well as
      >> both foreground and background colors. The following site contains
      >> screenshots. (Note that there are multiple tabs in addition to "Home": the
      >> "ywchaos", "Jnl and Txtfmt" and "ywtxt" tabs show Txtfmt regions
      >> supplementing the statically-defined regions of other wiki/journal
      >> filetypes.)
      >>
      >> http://www.txtfmt.webs.com/
      >>
      >> To use Txtfmt within a Vim help file, you would need to set the filetype to
      >> help.txtfmt. One way to do this would be with the following modeline:
      >>
      >> vim:ft=help.txtfmt
      >>
      >> If you decide to give it a try, there's a "Quick-Start Tutorial" on the
      >> download page that explains how to add the highlighting regions. Let me know
      >> if anything is unclear...
      >>
      >> Sincerely,
      >> Brett Stahlman
      >>
      >>
      >>
      >> thanks
      >>>
      >> --
      >> 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
      >>
      >
      >
      >

      --
      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
    • Brett Stahlman
      ... No problem. Glad to hear it works for you. Looks like you ve come up with a good approach. Let me know if you have any other issues... Sincerely, Brett
      Message 32 of 32 , Jun 9, 2010
        On Jun 8, 9:33 am, Pablo Giménez <pablog...@...> wrote:
        > Perfecto working liek a  charm.
        > Thanks
        > I have put this in my after/ftplugin/txtfmt.vim
        >
        > " Disable txtfmt formating if we aren't in gui mode
        > if !has("gui_running")
        >     call tdvim#StripTxtfmtTokens("help")
        > endif
        >
        > " Enable refresh if coor scheme changes:
        > autocmd ColorScheme <buffer> :Refresh
        >
        > Which seems to work nice.
        > Thansk for your help!

        No problem. Glad to hear it works for you. Looks like you've come up
        with a good approach. Let me know if you have any other issues...

        Sincerely,
        Brett Stahlman

        ...[snip]...

        --
        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.