Tuesday, June 1, 2010

Re: Progress indicator for :TOhtml command

On Tue, Jun 1, 2010 at 6:04 PM, Benjamin Fritz <fritzophrenic@gmail.com> wrote:
>
> I like this look a lot better! I made a few improvements:
>

And one more bugfix, to prevent throwing errors in the cleanup
commands at the end.

With the attached script on fairly recent hardware, I get the
following timings (in seconds) when converting the 2html.vim script to
html, several times and discarding the first few trials (these were
outliers...around 100 seconds, probably while getting the cache all
ironed out or something):

with progress bar:
34
34
35
32
32
without progress bar (using let html_no_progress=1):
33
33
33
33
32
32
33
30
unmodified "official" script (with autocmds to set winsize and
foldmethod to prevent syntax highlighting to screw with the results):
31
32
31
31

For me anyway, the difference made by the progress bar, with the
optimizations in the attached version of 2html.vim, is negligible.

So...is the screen flashing still too distracting? I think the version
attached handles it well enough, at least for my purposes.

Any additional comments or fixes?

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

Re: What does (fakeclip-y) mean?

On 02/06/10 01:29, Gary Furash wrote:
> I installed the fakeclip plugin. Normally, plugins are fairly
> straightforward (e.g., hit the "special" key (\) or something like
> that). However, the fake clip plugin says that it automatically loads
> default mappings like
>
> "+y for<Plug>(fakeclip-y)
>
> I've tried "+y in a variety of different ways: at the ":" prompt,
> while in command mode, etc. and it doesn't do anything.
>
> I'm sure I'm just missing something.
>
> I searched for a definition of<Plug> on the mailing list, but may not
> have been looking for the right thing.
>
> Thank you in advance for any assistance.
>

Well, with plain-vanilla Vim (without 3rd-party plugins I mean), "+y in
Visual mode yanks the selection to the clipboard, and in Normal mode it
waits for a motion (e.g. l for "one character") or an object (e.g. iw
for "inner word"); the text moved over, or the object, is then yanked to
the clipboard. In both cases you can paste it into any clipboard-aware
application, usually by means of Edit=>Paste. Anything that uses that as
the {lhs} of a mapping ought to do something similar.

I don't know what the parentheses are doing in that mapping; I would
expect a plugin-defined mapping to have a {rhs} of <Plug>fakeclip-y or
<Plug>FakeclipY but not something with parentheses in it.

<Plug> is explained in the Vim help: see
:help <Plug>
:help using-<Plug>

To see what "+y is mapped to, use (both of)
:verbose map "+y
:verbose map! "+y


Best regards,
Tony.
--
ARTHUR: What?
BLACK KNIGHT: None shall pass.
ARTHUR: I have no quarrel with you, good Sir knight, but I must cross
this bridge.
BLACK KNIGHT: Then you shall die.
The Quest for the Holy Grail (Monty
Python)

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

Re: "gq" text wrapping sentence separator

Yes, the ":set nojs" option worked. Thank you SO much!!!


scott-268 wrote:
>
> On Tuesday 01 June 2010 19:30:31 Joyce Tipping wrote:
>
>> Vim will put two spaces in between my sentences when I wrap
>> paragraphs with "gq." Is there a setting to tell it I only
>> want one?
>
> yes -- take a look at
>
> :help gq
>
> and read down rather far -- you'll come to a link to the
>
> 'joinspaces'
>
> option, which is i believe the one you are looking for
>
> sc
>
> --
> 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
>
>

--
View this message in context: http://old.nabble.com/%22gq%22-text-wrapping-sentence-separator-tp28748920p28749287.html
Sent from the Vim - General mailing list archive at Nabble.com.

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

Re: "gq" text wrapping sentence separator

On Tuesday 01 June 2010 19:30:31 Joyce Tipping wrote:

> Vim will put two spaces in between my sentences when I wrap
> paragraphs with "gq." Is there a setting to tell it I only
> want one?

yes -- take a look at

:help gq

and read down rather far -- you'll come to a link to the

'joinspaces'

option, which is i believe the one you are looking for

sc

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

"gq" text wrapping sentence separator

Vim will put two spaces in between my sentences when I wrap paragraphs with
"gq." Is there a setting to tell it I only want one?
--
View this message in context: http://old.nabble.com/%22gq%22-text-wrapping-sentence-separator-tp28748920p28748920.html
Sent from the Vim - General mailing list archive at Nabble.com.

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

Re: Formatting help files



2010/6/1 Brett Stahlman <brettstahlman@comcast.net>


...[snip]...
> > > And unfortunately is not working,
>
> > Pablo,
> > Do you mean that hi Ignore ctermfg=black does not change the
> > foreground color of the tokens to black? What happens if you
> > execute...
> > hi Ignore ctermfg=black
> > ...in a standard Vim help buffer? You will get "E421: Color name or
> > number not recognized" if the specified color is not supported by your
> > cterm. Or were you simply saying that black is not always the correct
> > background color?
>
>  Yep it is, the autocommand doesn't change the foreground color for the
> special characters to black.
> Also the background is black for the whole screen except for those words
> affected by the formating, which apperars with a grey background.
> I have attached a screenshot (I dont know if the list allows to attach
> files).
> If I execute the command from the command line the characters dissapears but
> the background is still grey rather than black.
> And yes, I am using a help file type, this is the modeline I am using:
> vim:tw=78:ts=8:ft=help.txtfmt:norl:

Pablo,
Thanks for the screenshot. I'll check into it tonight when I have
access to a real terminal on my Linux system at home. Do you mind
telling me what colorscheme and terminal you're using? Also, what type
of region is being applied to the text with the grey background (e.g.,
"TDVIM USER MANUAL")? (I'm guessing it's bold-italic, and you're using
a color terminal that doesn't really support italic, but displays it
as reverse video instead...)
Probably is this, because I was wondering why the italics doesn´t appear in the terminal.
Yep it is trying to use bold italics.
The color scheme is CodeFactory:
http://www.vim.org/scripts/script.php?script_id=3079
 

>
>
>
>
>
>
>
> > > I have check the list of autocommands and
> > > everything looks ok, with the new commands for ColorScheme event, but is
> > not
> > > working.
> > > The one that refresh txtfmt after loading a colro  scheme works grat and
> > now
> > > I can change my color scheme and get everything sync.
> > > If the hi Ignore would work I think that the perfect solution should be
> > to
> > > grab the background solor of the current colro scheme and use it as the
> > > colro for the Ignore group.
> > > There is any way to know the background color of the current scheme???
>
> > With the GUI, the background color is always known by Vim: thus, no
> > workaround is required for any colorscheme, since the plugin can
> > always do this:
>
> > :hi Ignore ctermfg=bg
>
> If you do this using a color scheme that doesn't define the background color
> you got an error.
> Any to detect if my current colorscheme is defining the background color, so
> I can use bg if it is defined or black otherwise .

Well, you could parse the output of...
:hi Normal
...but note that if your colorscheme defines the Normal background
color, you shouldn't have to do anything special; the plugin should
handle it...

Sincerely,
Brett Stahlman

> cheers
>
>
>
>
>
>
>
> > With a cterm, however, Vim has no way of knowing the background color
> > unless the colorscheme sets the Normal background color explicitly:
> > e.g.,
>
> > :hi Normal ctermbg=<some_color>
>
> > Some of the colorschemes contain this sort of explicit set of Normal
> > background color, but many simply leave it at the terminal's default.
> > If you want to use such a colorscheme in a color terminal, you will
> > have to determine the correct background color through visual
> > inspection. Having done that, you can either set the Ignore group's
> > ctermfg to match the observed background color (workaround #1) or
> > explicitly set the Normal group's ctermbg to match the observed
> > background color (workaround #2). Unfortunately, the plugin can't
> > determine the background color automatically, since Vim itself doesn't
> > know...
>
> > Thanks,
> > Brett S.
>
> > > cheers
>
> > > >  Also if you change your current colorscheme in gvim the "format
> > > >> chatacters"
> > > >> appears.
> > > >> Is there any way to ensure that "format" characters will stay hidden
> > > >> always?
>
> > > > After changing your colorscheme, you should run...
>
> > > > :Refresh
>
> > > > ...to get Txtfmt back in synch. This command can also be used when you
> > have
> > > > changed Txtfmt options and wish to have them take effect immediately
> > (i.e.,
> > > > without restarting Vim or reloading the buffer).
>
> > > > Let me know if any of this is unclear...
>
> > > > Thanks,
> > > > 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, visithttp://www.vim.org/maillist.php
>
> > > --
> > > Un saludo
> > > Best Regards
> > > Pablo Giménez- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> > 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, visithttp://www.vim.org/maillist.php
>
> --
> Un saludo
> Best Regards
> Pablo Giménez- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

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



--
Un saludo
Best Regards
Pablo Giménez

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

What does (fakeclip-y) mean?

I installed the fakeclip plugin. Normally, plugins are fairly
straightforward (e.g., hit the "special" key (\) or something like
that). However, the fake clip plugin says that it automatically loads
default mappings like

"+y for <Plug>(fakeclip-y)

I've tried "+y in a variety of different ways: at the ":" prompt,
while in command mode, etc. and it doesn't do anything.

I'm sure I'm just missing something.

I searched for a definition of <Plug> on the mailing list, but may not
have been looking for the right thing.

Thank you in advance for any assistance.

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