codekingpro/portable-devtools
114k
1:" Use this script to create the file "bugreport.txt", which contains2:" information about the environment of a possible bug in Vim.3:"4:" Maintainer: The Vim Project <https://github.com/vim/vim>5:" Last change: 2023 Aug 106:" Former Maintainer: Bram Moolenaar <Bram@vim.org>7:"8:" To use inside Vim:9:" :so $VIMRUNTIME/bugreport.vim10:" Or, from the command line:11:" vim -s $VIMRUNTIME/bugreport.vim12:"13:" The "if 1" lines are to avoid error messages when expression evaluation is14:" not compiled in.15:"16:if 117: let more_save = &more18:endif19:set nomore20:if has("unix")21: !echo "uname -a" >bugreport.txt22: !uname -a >>bugreport.txt23:endif24:redir >>bugreport.txt25:version26:if 127: func <SID>CheckDir(n)28: if isdirectory(a:n)29: echo 'directory "' . a:n . '" exists'30: else31: echo 'directory "' . a:n . '" does NOT exist'32: endif33: endfun34: func <SID>CheckFile(n)35: if filereadable(a:n)36: echo '"' . a:n . '" is readable'37: else38: echo '"' . a:n . '" is NOT readable'39: endif40: endfun41: echo "--- Directories and Files ---"42: echo '$VIM = "' . $VIM . '"'43: call <SID>CheckDir($VIM)44: echo '$VIMRUNTIME = "' . $VIMRUNTIME . '"'45: call <SID>CheckDir($VIMRUNTIME)46: call <SID>CheckFile(&helpfile)47: call <SID>CheckFile(fnamemodify(&helpfile, ":h") . "/tags")48: call <SID>CheckFile($VIMRUNTIME . "/menu.vim")49: call <SID>CheckFile($VIMRUNTIME . "/filetype.vim")50: call <SID>CheckFile($VIMRUNTIME . "/syntax/synload.vim")51: delfun <SID>CheckDir52: delfun <SID>CheckFile53: echo "--- Scripts sourced ---"54: scriptnames55:endif56:set all57:set termcap58:au59:if 160: echo "--- Normal/Visual mode mappings ---"61:endif62:map63:if 164: echo "--- Insert/Command-line mode mappings ---"65:endif66:map!67:if 168: echo "--- Abbreviations ---"69:endif70:ab71:if 172: echo "--- Highlighting ---"73:endif74:highlight75:if 176: echo "--- Variables ---"77:endif78:if 179: let80:endif81:redir END82:set more&83:if 184: let &more = more_save85: unlet more_save86:endif87:e bugreport.txt88 