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: 2000 Feb 15
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
28 : echo 'directory "' . a:n . '" exists'
30 : echo 'directory "' . a:n . '" does NOT exist'
33 : func BR_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 BR_CheckDir($VIM)
43 : echo '$VIMRUNTIME = "' . $VIMRUNTIME . '"'
44 : call BR_CheckDir($VIMRUNTIME)
45 : call BR_CheckFile(&helpfile)
46 : call BR_CheckFile(fnamemodify(&helpfile, ":h") . "/tags")
47 : call BR_CheckFile($VIMRUNTIME . "/menu.vim")
48 : call BR_CheckFile($VIMRUNTIME . "/filetype.vim")
49 : call BR_CheckFile($VIMRUNTIME . "/syntax/synload.vim")
59 : echo "--- Normal mode mappings ---"
63 : echo "--- Insert mode mappings ---"
67 : echo "--- Abbreviations ---"
71 : echo "--- Highlighting ---"
75 : echo "--- Variables ---"
83 : let &more = more_save