[Vim-latex-cvs] vimfiles/ftplugin/latex-suite wizardfuncs.vim,1.10,1.11
Brought to you by:
srinathava,
tmaas
From: <mi...@us...> - 2003-04-06 22:59:42
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv17410 Modified Files: wizardfuncs.vim Log Message: improved F1 wrapper: proper error message (thanks Benji), checks for environment names Index: wizardfuncs.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/wizardfuncs.vim,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wizardfuncs.vim 4 Apr 2003 23:25:03 -0000 1.10 --- wizardfuncs.vim 6 Apr 2003 22:59:37 -0000 1.11 *************** *** 204,219 **** " ============================================================================== ! inoremap <buffer> <silent> <F1> <C-O>:silent! call <SID>TexHelp()<CR> ! nnoremap <buffer> <silent> <F1> :silent! call <SID>TexHelp()<CR> ! command! -nargs=0 THelp silent! call <SID>TexHelp() " TexHelp: Cursor being on LaTeX item check if exists help tag about it " {{{ function! s:TexHelp() ! if synIDattr(synID(line('.'),col('.')-1,0),"name") =~ '^tex' setlocal isk+=\ let curword = expand('<cword>') setlocal isk-=\ ! if curword =~ "^\\" ! exe 'help ' . curword else help --- 204,227 ---- " ============================================================================== ! inoremap <buffer> <silent> <F1> <C-O>:call <SID>TexHelp()<CR> ! nnoremap <buffer> <silent> <F1> :call <SID>TexHelp()<CR> ! command! -nargs=0 THelp call <SID>TexHelp() " TexHelp: Cursor being on LaTeX item check if exists help tag about it " {{{ function! s:TexHelp() ! let syntax_item = synIDattr(synID(line('.'),col('.')-1,0),"name") ! if syntax_item =~ '^tex' setlocal isk+=\ let curword = expand('<cword>') setlocal isk-=\ ! let v:errmsg = '' ! if curword =~ "^\\" || syntax_item == 'texSectionName' ! exe 'silent! help '.curword ! if v:errmsg =~ '^E149:' ! echohl ErrorMsg ! exe "echomsg 'Sorry, no help for LaTeX: ".curword."'" ! echohl None ! let v:errmsg = '' ! endif else help |