Hi,
Meino Christian Cramer wrote:
>
> I would like to know, whether it is possible to get a fullscreen help
> when doing
>
> :h <something>
>
> or other help-actionis without loosing the buffers already loaded so
> far ?
if you are willing to open the help text in a separate window (i.e.,
another GVIM instance) you might like the following plugin.
let s:help_initialized = 0
let s:help_server = 'GVIM ' . (v:version / 100) . '.' . (v:version % 100) .
' HELP'
function! InitHelpSystem()
if s:help_initialized
return
endif
" Put the Help window in the upper left corner of the screen.
winpos 0 0
" Set up the preferred color scheme ...
if exists('g:HelpColorscheme')
exe 'colorscheme ' . g:HelpColorscheme
else
colorscheme peachpuff
endif
" ... and font.
if exists('g:HelpFont')
exe 'set guifont=' . g:HelpFont
else
set guifont=Lucida_Sans_Typewriter:h9:cANSI
endif
" Use as much space for the help text as possible.
set noruler
set cmdheight=1
set guioptions-=m
set laststatus=0
set lines=100
" Don't highlight the current line and column.
if version >= 700
set nocursorcolumn
set nocursorline
endif
" Close the Help window with the <escape> key.
nnoremap <esc> :q<cr>
let s:help_initialized = 1
endfunction
function! s:StartHelpServer(servername, topic)
let prg = substitute(v:progname, 'diff', '', '')
let cmd = '!start ' . prg . ' --servername "' . a:servername . '"'
let arg = '-c ":call InitHelpSystem() | help ' . a:topic . ' | silent
only | normal zz"'
exe cmd . ' ' . arg
endfunction
function! s:ControlHelpServer(servername, topic)
let cmd = ':help ' . a:topic . ' | silent only<cr>zz<c-l>'
call remote_send(a:servername, cmd)
call remote_foreground(a:servername)
endfunction
function! s:VimHelp(topic)
let topic = escape(a:topic, '!\')
if match(serverlist(), '\<' . s:help_server . '\>') == -1
call s:StartHelpServer(s:help_server, l:topic)
else
call s:ControlHelpServer(s:help_server, l:topic)
endif
endfunction
command! -narg=? -complete=help Help :silent call <SID>VimHelp(<q-args>)
After you have put it in your local plugin directory you might want to
make some changes in the InitHelpSystem() function to adapt it to your
personal preferences for colors, fonts, and other options. After that
a fullscreen help window is available with ":Help ..." instead of
":help ..." (note the uppercase "H").
Regards,
Jürgen
--
Jürgen Krämer Softwareentwicklung
HABEL GmbH & Co. KG mailto:[EMAIL PROTECTED]
Hinteres Öschle 2 Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-Weilheim Fax: +49 / 74 61 / 93 53 - 99