cga2000 wrote:
On Sat, Sep 30, 2006 at 03:25:08PM EDT, samitj wrote:
[..]
2) I modified my .vimrc file with some color settings. However, now I just
get a blank screen with my xterm color covering the whole screen - cant see
any text. HOw do I fix this?
I find that rather than making extensive changes to my .vimrc, a useful
approach is experimenting in Command-line mode .. one color change at a
time ..
This lets you test your changes interactively before adding them to your
.vimrc.
Thanks
cga
Rather than adding them to your vimrc, you may want to build a colorscheme (a
script concerned only with color settings and living in the colors/
subdirectory of a directory named in 'runtimepath'). Note that $VIMRUNTIME/
and everything under it are reserved for files distributed with Vim: any
upgrade can silently overwrite anything there, so you should use other trees
for your own files: $VIM/vimfiles for system-wide scripts, ~/vimfiles or
~/.vim (depending on OS) for user-private scripts.
There are a number of colorschemes in $VIMRUNTIME/colors/ ; I'm adding my own
rather simple one (attached) as an additional source of inspiration.
To invoke a colorscheme, use the ":colorscheme" command with the script name
(not including the .vim extension).
After making changes to your current colorscheme, ":syntax on" will reapply it.
Best regards,
Tony.
" Vim color file
" Maintainer: Tony Mechelynck <[EMAIL PROTECTED]>
" Last Change: 2006 Sep 06
"
÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷
" This is almost the default color scheme. It doesn't define the Normal
" highlighting, it uses whatever the colors used to be.
" Only the few highlight groups named below are defined; the rest (most of
" them) are left at their compiled-in default settings.
" Set 'background' back to the default. The value can't always be estimated
" and is then guessed.
hi clear Normal
set bg&
" Remove all existing highlighting and set the defaults.
hi clear
" Load the syntax highlighting defaults, if it's enabled.
if exists("syntax_on")
syntax reset
endif
" Set our own highlighting settings
hi SpecialKey guibg=NONE
hi PyjamaEven gui=NONE guibg=#FFD8FF
" white on red is not always distinct in the GUI: use black on red then
hi Error guibg=red
guifg=black
hi clear ErrorMsg
hi link ErrorMsg Error
" show cursor line/column (if enabled) in very light grey in the GUI,
" underlined in the console
if has("gui_running")
hi clear CursorLine
hi CursorLine guibg=#F4F4F4
endif
hi clear CursorColumn
hi link CursorColumn CursorLine
" do not make help bars and stars invisible
hi clear helpBar
hi link helpBar helpHyperTextJump
hi clear helpStar
hi link helpStar helpHyperTextEntry
" the following were forgotten in the syntax/vim.vim (and ended up cleared)
hi clear vimVar
hi link vimVar Identifier
hi clear vimGroupName
hi link vimGroupName vimGroup
hi clear vimHiClear
hi link vimHiClear vimHighlight
" display the status line of the active window in a distinctive color:
" bold white on bright red in the GUI, white on green in the console (where the
bg is
" never bright, and dark red is sometimes an ugly sort of reddish brown).
hi StatusLine gui=NONE,bold guibg=red
guifg=white
\ cterm=NONE,bold ctermbg=green
ctermfg=white
" make the status line bold-reverse (but B&W) for inactive windows
hi StatusLineNC gui=reverse,bold
\ cterm=reverse,bold
" define colors for the tab line:
" file name of unselected tab
hi TabLine gui=NONE guibg=#EEEEEE
guifg=black
\ cterm=NONE,bold ctermbg=lightgrey
ctermfg=white
" file name of selected tab (GUI default is bold black on white)
hi TabLineSel cterm=NONE,bold ctermbg=green
ctermfg=white
" fillup and tab-delete "X" at right
hi TabLineFill gui=NONE,bold guibg=#CCCCCC
guifg=#AA0000
\ cterm=NONE ctermbg=lightgrey
ctermfg=red
" tab and file number 1:2/3 (meaning "tab 1: window 2 of 3) for selected tab
hi User1 gui=bold guibg=white
guifg=magenta
\ ctermbg=green
ctermfg=black
" tab and file number 1:2/3 for unselected tab
hi User2 guibg=#EEEEEE
guifg=magenta
\ ctermbg=lightgrey
ctermfg=black
" additional override for manpages à la Dr. Chip
hi manSubSectionStart guibg=white
guifg=yellow
\ ctermbg=black
ctermfg=darkblue
" remember the current colorscheme name
let colors_name = "almost-default"
" vim: sw=2