Tuesday, June 1, 2010

Re: Formatting help files

Pablo Giménez wrote:
> 2010/5/28 Stahlman Family <brettstahlman@comcast.net>
>
>> 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

No comments: