Wednesday, June 2, 2010

Re: Formatting help files



2010/6/2 Stahlman Family <brettstahlman@comcast.net>


Pablo Giménez wrote:
...[snip]...


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

Pablo,
I think I understand what's going on... If I'm correct, you are unable to hide the special characters because your terminal's default background color is black, but its "color palette" doesn't contain black. Note that in addition to the default "Text color" and "Background color", color terminals have what is known as a "Color palette". The colors in the color palette (also known as the color cube) are completely independent of the Text color and Background color. Vim's ctermfg/ctermbg mechanism works properly only for colors in the color palette: thus, setting ctermbg or ctermfg to the default Background color won't work unless the default Background color happens to be in the color palette. In other words, the workarounds will work only if the default background color is in the color palette.
Mmmm I am also using gnome-terminal and I have tried with both Linux console and Xterm Built-in schemes. both have black in the palette and the workaroundusing the autocommand is not working.
when I type:
:hi Ignore ctermfg=black
it works but not automatically using autocommands.
If I type  :au to get the list of all the autocommands I got this:
 colorStarted  ColorScheme
    *         hi Ignore ctermfg=black
              Refresh
So it seems that the command is properly registered and should be working. Is the same command I use from teh command line so it should be doing something.
And because the command works from the command line I suppose the terminal color palette has black.

I have attached a screenshot which shows the same text in gvim, gnome- terminal, and below xterm and gnome-termnial color settings.
Another problem seems to be the lack of italics support in my terminals both, gnome-terminal and xterm don't shpw italics characters.
I have been googling a little but there aren't too much help for this. In the gnome-terminal the only setting related to font style is enable/disable bold fonts. How do you enable italics in your terminals.
I am using Deja Vu Sans Mono as the font for gnome-terminal.

Finally as a temp workaround One thing I can do is to disable text formatting when a txtfmt file is opened in a non-gui environment and also if it would be possible delete the funny characters, but just in the buffer not in the file itself, it is possible?
This way no matter user's terminal settings you can offer a workaround, just disable any kind of formatting in your bufferm, and at least give something readable.

cheers and thanks for your help

I don't know what color terminal you're using, but I was able to reproduce what you were seeing in gnome-terminal. I was able to fix it by changing to a color palette that contained black...

On the gnome-terminal title bar...

Edit->Profile Preferences...

...brings up a dialog with multiple tabs. On the "Colors" tab, you can define the default foreground and background colors with the "Text color" and "Background color" color pickers. Under "Palette", there's a combo box that allows you to select from a number of built-in schemes. I was originally using "Tango", which had a couple different shades of grey, but no black. The others (Linux console, XTerm and Rxvt) all had black as the first color in the palette. After I had switched to "Linux console", the workarounds were successful...

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

No comments: