Mercurial > vim
view runtime/spell/cleanadd.vim @ 34378:4d02bc6ddd97
runtime(doc): Add a place holder section for version 9.2 (#14060)
Commit: https://github.com/vim/vim/commit/15935e7f54f0e00782a55ebc39a68e4cd94c2571
Author: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
Date: Tue Feb 20 10:48:22 2024 -0800
runtime(doc): Add a place holder section for version 9.2 (https://github.com/vim/vim/issues/14060)
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 20 Feb 2024 20:00:08 +0100 |
parents | b9740fb41986 |
children |
line wrap: on
line source
" Vim script to clean the ll.xxxxx.add files of commented out entries " Author: Antonio Colombo, Bram Moolenaar " Last Update: 2008 Jun 3 " Time in seconds after last time an ll.xxxxx.add file was updated " Default is one second. " If you invoke this script often set it to something bigger, e.g. 60 * 60 " (one hour) if !exists("g:spell_clean_limit") let g:spell_clean_limit = 1 endif " Loop over all the runtime/spell/*.add files. " Delete all comment lines, except the ones starting with ##. for s:fname in split(globpath(&rtp, "spell/*.add"), "\n") if filewritable(s:fname) && localtime() - getftime(s:fname) > g:spell_clean_limit if exists('*fnameescape') let s:f = fnameescape(s:fname) else let s:f = escape(s:fname, ' \|<') endif silent exe "tab split " . s:f echo "Processing" s:f silent! g/^#[^#]/d silent update close unlet s:f endif endfor unlet s:fname echo "Done"