1 :" Use this script to create the file "bugreport.txt", which contains
2 :" information about the environment of a possible bug in Vim.
4 :" Maintainer: Bram Moolenaar <Bram@vim.org>
5 :" Last change: 2005 Jun 12
8 :" :so $VIMRUNTIME/bugreport.vim
9 :" Or, from the command line:
10 :" vim -s $VIMRUNTIME/bugreport.vim
12 :" The "if 1" lines are to avoid error messages when expression evaluation is
16 : let more_save = &more
20 : !echo "uname -a" >bugreport.txt
21 : !uname -a >>bugreport.txt
23 :redir >>bugreport.txt
26 : func <SID>CheckDir(n)
28 : echo 'directory "' . a:n . '" exists'
30 : echo 'directory "' . a:n . '" does NOT exist'
33 : func <SID>CheckFile(n)
34 : if filereadable(a:n)
35 : echo '"' . a:n . '" is readable'
37 : echo '"' . a:n . '" is NOT readable'
40 : echo "--- Directories and Files ---"
41 : echo '$VIM = "' . $VIM . '"'
42 : call <SID>CheckDir($VIM)
43 : echo '$VIMRUNTIME = "' . $VIMRUNTIME . '"'
44 : call <SID>CheckDir($VIMRUNTIME)
45 : call <SID>CheckFile(&helpfile)
46 : call <SID>CheckFile(fnamemodify(&helpfile, ":h") . "/tags")
47 : call <SID>CheckFile($VIMRUNTIME . "/menu.vim")
48 : call <SID>CheckFile($VIMRUNTIME . "/filetype.vim")
49 : call <SID>CheckFile($VIMRUNTIME . "/syntax/synload.vim")
50 : delfun <SID>CheckDir
51 : delfun <SID>CheckFile
52 : echo "--- Scripts sourced ---"
61 : echo "--- Normal/Visual mode mappings ---"
65 : echo "--- Insert/Command-line mode mappings ---"
69 : echo "--- Abbreviations ---"
73 : echo "--- Highlighting ---"
77 : echo "--- Variables ---"
85 : let &more = more_save