To: vim_dev@googlegroups.com Subject: Patch 8.2.4891 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4891 Problem: Vim help presentation could be better. Solution: Add an imported file for extra Vim help support. Show highlight names in the color they have. Files: Filelist, runtime/import/dist/vimhelp.vim *** ../vim-8.2.4890/Filelist 2022-04-03 18:01:39.647574472 +0100 --- Filelist 2022-05-01 19:02:26.133792911 +0100 *************** *** 722,727 **** --- 722,728 ---- runtime/doc/xxd.1 \ runtime/ftoff.vim \ runtime/gvimrc_example.vim \ + runtime/import/dist/vimhelp.vim \ runtime/macros/README.txt \ runtime/macros/editexisting.vim \ runtime/macros/hanoi/click.me \ *** ../vim-8.2.4890/runtime/import/dist/vimhelp.vim 1970-01-01 00:00:00.000000000 +0000 --- runtime/import/dist/vimhelp.vim 2022-05-01 19:05:11.138372772 +0100 *************** *** 0 **** --- 1,21 ---- + vim9script + + # Extra functionality for displaying Vim help . + + # Called when editing the doc/syntax.txt file + export def HighlightGroups() + var buf: number = bufnr('%') + var lnum: number = search('\*highlight-groups\*', 'cn') + while getline(lnum) !~ '===' && lnum < line('$') + var word: string = getline(lnum)->matchstr('^\w\+\ze\t') + if word->hlexists() + prop_type_add('help-hl-' .. word, { + bufnr: buf, + highlight: word, + combine: false, + }) + prop_add(lnum, 1, {length: word->strlen(), type: 'help-hl-' .. word}) + endif + ++lnum + endwhile + enddef *** ../vim-8.2.4890/src/version.c 2022-05-06 16:18:37.129781976 +0100 --- src/version.c 2022-05-06 16:31:16.761564439 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4891, /**/ -- "A clear conscience is usually the sign of a bad memory." -- Steven Wright /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///