annotate runtime/autoload/netrwSettings.vim @ 2189:cb94c42c0e1a v7.2.445

updated for version 7.2.445 Problem: Crash when using undo/redo and a FileChangedRO autocmd event that reloads the buffer. (Dominique Pelle) Solution: Do not allow autocommands while performing and undo or redo.
author Bram Moolenaar <bram@vim.org>
date Wed, 07 Jul 2010 18:20:28 +0200
parents 7bc41231fbc7
children c53344bacabf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
1 " netrwSettings.vim: makes netrw settings simpler
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
2 " Date: Sep 03, 2008
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
3 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
4 " Version: 13
1122
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
5 " Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
6 " Permission is hereby granted to use and distribute this code,
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
7 " with or without modifications, provided that this copyright
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
8 " notice is copied with it. Like anything else that's free,
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
9 " netrwSettings.vim is provided *as is* and comes with no
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
10 " warranty of any kind, either expressed or implied. By using
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
11 " this plugin, you agree that in no event will the copyright
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
12 " holder be liable for any damages resulting from the use
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
13 " of this software.
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
14 "
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
15 " Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
16 " synagogues, preaching the gospel of the kingdom, and healing
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
17 " every disease and every sickness among the people.
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
18 " Load Once: {{{1
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
19 if exists("g:loaded_netrwSettings") || &cp
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
20 finish
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
21 endif
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
22 let g:loaded_netrwSettings = "v13"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
23 if v:version < 700
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
24 echohl WarningMsg
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
25 echo "***warning*** this version of netrwSettings needs vim 7.0"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
26 echohl Normal
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
27 finish
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
28 endif
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
29
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
30 " ---------------------------------------------------------------------
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
31 " NetrwSettings: {{{1
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
32 fun! netrwSettings#NetrwSettings()
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
33 " this call is here largely just to insure that netrw has been loaded
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
34 call netrw#NetrwSavePosn()
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
35 if !exists("g:loaded_netrw")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
36 echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
37 return
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
38 endif
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
39
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
40 above wincmd s
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
41 enew
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
42 setlocal noswapfile bh=wipe
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
43 set ft=vim
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
44 file Netrw\ Settings
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
45
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
46 " these variables have the following default effects when they don't
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
47 " exist (ie. have not been set by the user in his/her .vimrc)
1122
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
48 if !exists("g:netrw_liststyle")
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
49 let g:netrw_liststyle= 0
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
50 let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
51 endif
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
52 if !exists("g:netrw_silent")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
53 let g:netrw_silent= 0
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
54 endif
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
55 if !exists("g:netrw_use_nt_rcp")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
56 let g:netrw_use_nt_rcp= 0
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
57 endif
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
58 if !exists("g:netrw_ftp")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
59 let g:netrw_ftp= 0
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
60 endif
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
61 if !exists("g:netrw_ignorenetrc")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
62 let g:netrw_ignorenetrc= 0
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
63 endif
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
64
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 719
diff changeset
65 put ='+ ---------------------------------------------'
95dac6af3b3a updated for version 7.0232
vimboss
parents: 719
diff changeset
66 put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
95dac6af3b3a updated for version 7.0232
vimboss
parents: 719
diff changeset
67 put ='+ Press <F1> with cursor atop any line for help'
95dac6af3b3a updated for version 7.0232
vimboss
parents: 719
diff changeset
68 put ='+ ---------------------------------------------'
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
69 let s:netrw_settings_stop= line(".")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
70
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
71 put =''
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
72 put ='+ Netrw Protocol Commands'
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
73 put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
74 put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
75 put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
76 put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
77 put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
78 put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
79 put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
80 put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
81 put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
82 let s:netrw_protocol_stop= line(".")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
83 put = ''
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
84
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
85 put ='+Netrw Transfer Control'
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
86 put = 'let g:netrw_cygwin = '.g:netrw_cygwin
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
87 put = 'let g:netrw_ftp = '.g:netrw_ftp
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
88 put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
89 put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1122
diff changeset
90 put = 'let g:netrw_sshport = '.g:netrw_sshport
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
91 put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
92 put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
93 let s:netrw_xfer_stop= line(".")
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1122
diff changeset
94 put =''
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1122
diff changeset
95 put ='+ Netrw Messages'
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1122
diff changeset
96 put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
97
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
98 put = ''
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
99 put ='+ Netrw Browser Control'
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
100 put = 'let g:netrw_alto = '.g:netrw_alto
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
101 put = 'let g:netrw_altv = '.g:netrw_altv
650
662e40bd2be1 updated for version 7.0191
vimboss
parents: 557
diff changeset
102 put = 'let g:netrw_browse_split = '.g:netrw_browse_split
662e40bd2be1 updated for version 7.0191
vimboss
parents: 557
diff changeset
103 if exists("g:netrw_browsex_viewer")
662e40bd2be1 updated for version 7.0191
vimboss
parents: 557
diff changeset
104 put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
662e40bd2be1 updated for version 7.0191
vimboss
parents: 557
diff changeset
105 else
662e40bd2be1 updated for version 7.0191
vimboss
parents: 557
diff changeset
106 put = 'let g:netrw_browsex_viewer = (not defined)'
662e40bd2be1 updated for version 7.0191
vimboss
parents: 557
diff changeset
107 endif
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
108 put = 'let g:netrw_compress = '.g:netrw_compress
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
109 put = 'let g:netrw_cursorline = '.g:netrw_cursorline
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
110 let decompressline= line("$")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
111 put ='let g:netrw_decompress...'
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
112 put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
719
82ef0c58b012 updated for version 7.0219
vimboss
parents: 650
diff changeset
113 put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
114 let fnameescline= line("$")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
115 put = 'let g:netrw_fname_escape...'
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
116 put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
117 put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
1122
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
118 put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
119 put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
120 let globescline= line("$")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
121 put ='let g:netrw_glob_escape...'
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
122 put = 'let g:netrw_hide = '.g:netrw_hide
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
123 put = 'let g:netrw_keepdir = '.g:netrw_keepdir
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
124 put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
125 put = 'let g:netrw_list_hide = '.g:netrw_list_hide
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
126 put = 'let g:netrw_liststyle = '.g:netrw_liststyle
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
127 put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
128 put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
129 put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
130 put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
131 put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
1122
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
132 put = 'let g:netrw_menu = '.g:netrw_menu
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
133 put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
134 put = 'let g:netrw_preview = '.g:netrw_preview
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
135 put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
136 put = 'let g:netrw_retmap = '.g:netrw_retmap
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
137 put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
138 put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
139 put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
140 put = 'let g:netrw_silent = '.g:netrw_silent
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
141 put = 'let g:netrw_sort_by = '.g:netrw_sort_by
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
142 put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
143 put = 'let g:netrw_sort_options = '.g:netrw_sort_options
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
144 put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
145 put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
146 put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1122
diff changeset
147 put = 'let g:netrw_scpport = '.g:netrw_scpport
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
148 put = 'let g:netrw_sepchr = '.g:netrw_sepchr
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1122
diff changeset
149 put = 'let g:netrw_sshport = '.g:netrw_sshport
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
150 put = 'let g:netrw_timefmt = '.g:netrw_timefmt
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
151 let tmpfileescline= line("$")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
152 put ='let g:netrw_tmpfile_escape...'
1122
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
153 put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
154 put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
155 put = 'let g:netrw_winsize = '.g:netrw_winsize
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
156
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
157 put =''
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1122
diff changeset
158 put ='+ For help, place cursor on line and press <F1>'
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
159
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
160 1d
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
161 silent %s/^+/"/e
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
162 res 99
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
163 silent %s/= \([^0-9].*\)$/= '\1'/e
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
164 silent %s/= $/= ''/e
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
165 1
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
166
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
167 call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
168 call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
169 call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
170 call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
1122
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
171
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
172 set nomod
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
173
1122
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
174 nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
2ad54fcf37e3 updated for version 7.1a
vimboss
parents: 798
diff changeset
175 nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr>
557
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
176 let tmpfile= tempname()
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
177 exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
178 endfun
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
179
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
180 " ---------------------------------------------------------------------
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
181 " NetrwSettingHelp: {{{2
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
182 fun! NetrwSettingHelp()
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
183 " call Dfunc("NetrwSettingHelp()")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
184 let curline = getline(".")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
185 if curline =~ '='
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
186 let varhelp = substitute(curline,'^\s*let ','','e')
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
187 let varhelp = substitute(varhelp,'\s*=.*$','','e')
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
188 " call Decho("trying help ".varhelp)
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
189 try
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
190 exe "he ".varhelp
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
191 catch /^Vim\%((\a\+)\)\=:E149/
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
192 echo "***sorry*** no help available for <".varhelp.">"
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
193 endtry
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
194 elseif line(".") < s:netrw_settings_stop
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
195 he netrw-settings
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
196 elseif line(".") < s:netrw_protocol_stop
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
197 he netrw-externapp
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
198 elseif line(".") < s:netrw_xfer_stop
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
199 he netrw-variables
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
200 else
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
201 he netrw-browse-var
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
202 endif
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
203 " call Dret("NetrwSettingHelp")
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
204 endfun
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
205
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
206 " ---------------------------------------------------------------------
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
207 " Modelines: {{{1
862863033fdd updated for version 7.0158
vimboss
parents:
diff changeset
208 " vim:ts=8 fdm=marker