2010/6/3 Stahlman Family <brettstahl...@comcast.net>

>
>
> Pablo Giménez wrote:
> ...[snip]...
>
>
>
>>>>  Hmmm... That's very strange. Are you sure that the `hi Ignore
>>> ctermfg=black' command is never executed? I'm wondering whether it's
>>> possible that something else is changing the Ignore ctermfg setting after
>>> the `hi Ignore' command... There are several ways you could check this.
>>> The
>>> simplest is probably to run `:hi Ignore' at the command line, both just
>>> before and just after changing the colorscheme, to see what happens to
>>> ctermfg. Note that you can also set 'verbose' just before running
>>> `:colorscheme' to see the exact sequence of commands that are executed.
>>> (`set verbose=0' gets you out of verbose mode.)
>>>
>>
>> I have changed the autocommand to:
>> augroup colorStarted
>>    if !has("gui_running")
>>        autocmd ColorScheme * hi Ignore ctermfg=0
>>    endif
>>    "autocmd ColorScheme * :Refresh
>>    augroup END
>>
>> And running:
>> :verbose hi Ignore
>> Ignore         xxx ctermfg=0
>>        Last set from /usr/share/vim/vim71/syntax/syncolor.vim
>>
> Thanks Bret I have modified your function:

 function! tdvim#StripTxtfmtTokens(bufferType)
    "if has('gui_running')
    "Don't strip tokens for GUI
    "return
    "endif
    "Create an empty buffer not associated with any file
    "new

    "If buffer type doesn't match then go out
    if &buftype != a:bufferType
    return ''
    endif

    let l:tmpBuffType = &buftype
    set modifiable
    set buftype=nofile
    " Read the help.txtfmt file into the empty buffer
    :r #
    " Delete all Txtfmt tokens
    silent! %s/[\ue000-\ue019]//g
    " Restore buffer type
    let &ft=l:tmpBuffType
    set nomodifiable
    " Discard the original buffer
    :bd #
endfu

My problem now is that I got  a lot of errors like:
E315: ml_get: invalid lnum: 82
E315: ml_get: invalid lnum: 81
E315: ml_get: invalid lnum: 80
E315: ml_get: invalid lnum: 79
E315: ml_get: invalid lnum: 78
E315: ml_get: invalid lnum: 77
E315: ml_get: invalid lnum: 76
E315: ml_get: invalid lnum: 75
E315: ml_get: invalid lnum: 74
E315: ml_get: invalid lnum: 73
E315: ml_get: invalid lnum: 72
E315: ml_get: invalid lnum: 71
E315: ml_get: invalid lnum: 70
E315: ml_get: invalid lnum: 69
E315: ml_get: invalid lnum: 68
E315: ml_get: invalid lnum: 67
E315: ml_get: invalid lnum: 66
E315: ml_get: invalid lnum: 65
E315: ml_get: invalid lnum: 64
E315: ml_get: invalid lnum: 63
E315: ml_get: invalid lnum: 62
E315: ml_get: invalid lnum: 61
E315: ml_get: invalid lnum: 60
E315: ml_get: invalid lnum: 59
E315: ml_get: invalid lnum: 58
E315: ml_get: invalid lnum: 57
E315: ml_get: invalid lnum: 56
E315: ml_get: invalid lnum: 55
E315: ml_get: invalid lnum: 54
E315: ml_get: invalid lnum: 53
E315: ml_get: invalid lnum: 52
E315: ml_get: invalid lnum: 51
E315: ml_get: invalid lnum: 50
E315: ml_get: invalid lnum: 49

I guess this is because the statement:
silent! %s/[\ue000-\ue019]//g
Is looking for incorrect characters.
Executing :ShowTokenMap shows that the charaters numbers recognized goes
from 180 to 205.
If this is the problem, how I can know the characters range recognized by
txtfmmt and then use this range in the substitue expression???
Thanks


> Pablo,
> If your autocommand is being executed, it should show that it was last set
> from the file containing the autocommand definitions. For me, that's
> ~/.vimrc. Where did you put the autocommand definitions?
>
>
>
>> Which I am not sure if it good or not.
>> Thing is that when I change to another colorcheme now the funny chracters
>> dissapear. I amtrying now with the zenburn color scheme.
>> But the background color for the words with formatting is white rather
>> than
>> grey, which is the ciolor it should have.
>>
>
> I've downloaded zenburn color scheme, and I believe I can explain what
> you're seeing... Since your terminal doesn't support italic, any region
> involving italic is displayed in a "reverse" mode:
>
> reverse fg ==> Normal ctermbg
> reverse bg ==> Normal ctermfg
>
> Notice that the white background you mentioned matches the color of
> unhighlighted (Normal) text.
>
> `:hi Normal' displays ctermfg=188 ctermbg=237
>
> If you change ctermfg as follows...
>
> :hi Normal ctermfg=150
>
> ...you'll see the white background color (as well as all the normal,
> unhighlighted text) change to a sort of green.
>
> NOTE: It seems to me that the reverse video is not really the problem; the
> problem is reverse video where there is no text. To avoid this, you could
> turn off all formatting just after "TDVIM USER MANUAL", and restart the
> highlighting just prior to the text on the subsequent line. It requires a
> few more tokens, but would eliminate the long strip of reverse video at the
> beginning of the line. In other words...
>
>  <Leading whitespace>        <fbi> TDVIM USER MANUAL <f->
>  <Leading whitespace> <fi> TDVim And Side Effect's Houdini <f->
>
>
> 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
>



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

Reply via email to