annotate runtime/bugreport.vim @ 40:01573c245f15

fix for remote editor
author one@zeus.cr.ie.u-ryukyu.ac.jp
date Sat, 18 Dec 2010 18:47:04 +0900
parents 76efa0be13f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 :" Use this script to create the file "bugreport.txt", which contains
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 :" information about the environment of a possible bug in Vim.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 :"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 :" Maintainer: Bram Moolenaar <Bram@vim.org>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 :" Last change: 2005 Jun 12
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6 :"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 :" To use inside Vim:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 :" :so $VIMRUNTIME/bugreport.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9 :" Or, from the command line:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 :" vim -s $VIMRUNTIME/bugreport.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 :"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 :" The "if 1" lines are to avoid error messages when expression evaluation is
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13 :" not compiled in.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 :"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16 : let more_save = &more
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18 :set nomore
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19 :if has("unix")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 : !echo "uname -a" >bugreport.txt
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 : !uname -a >>bugreport.txt
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 :redir >>bugreport.txt
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 :version
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26 : func <SID>CheckDir(n)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 : if isdirectory(a:n)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 : echo 'directory "' . a:n . '" exists'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29 : else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 : echo 'directory "' . a:n . '" does NOT exist'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 : endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 : endfun
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33 : func <SID>CheckFile(n)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 : if filereadable(a:n)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 : echo '"' . a:n . '" is readable'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 : else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 : echo '"' . a:n . '" is NOT readable'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 : endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39 : endfun
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 : echo "--- Directories and Files ---"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41 : echo '$VIM = "' . $VIM . '"'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42 : call <SID>CheckDir($VIM)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 : echo '$VIMRUNTIME = "' . $VIMRUNTIME . '"'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44 : call <SID>CheckDir($VIMRUNTIME)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45 : call <SID>CheckFile(&helpfile)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 : call <SID>CheckFile(fnamemodify(&helpfile, ":h") . "/tags")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 : call <SID>CheckFile($VIMRUNTIME . "/menu.vim")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48 : call <SID>CheckFile($VIMRUNTIME . "/filetype.vim")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49 : call <SID>CheckFile($VIMRUNTIME . "/syntax/synload.vim")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50 : delfun <SID>CheckDir
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51 : delfun <SID>CheckFile
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52 : echo "--- Scripts sourced ---"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53 : scriptnames
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55 :set all
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56 :set termcap
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57 :if has("autocmd")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58 : au
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 : echo "--- Normal/Visual mode mappings ---"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 :map
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 : echo "--- Insert/Command-line mode mappings ---"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 :map!
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69 : echo "--- Abbreviations ---"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71 :ab
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 : echo "--- Highlighting ---"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75 :highlight
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 : echo "--- Variables ---"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
80 : let
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82 :redir END
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 :set more&
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84 :if 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 : let &more = more_save
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86 : unlet more_save
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87 :endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88 :e bugreport.txt