Mercurial > vim
annotate runtime/autoload/netrwSettings.vim @ 15446:8ac454818352 v8.1.0731
patch 8.1.0731: JS encoding does not handle negative infinity
commit https://github.com/vim/vim/commit/5f6b379ff3e34297d171635933f907ec80ed4f05
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 12 14:24:27 2019 +0100
patch 8.1.0731: JS encoding does not handle negative infinity
Problem: JS encoding does not handle negative infinity.
Solution: Add support for negative infinity for JS encoding. (Dominique
Pelle, closes #3792)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Jan 2019 14:30:06 +0100 |
parents | 92a0a33f8296 |
children | ca8e754bdd53 |
rev | line source |
---|---|
557 | 1 " netrwSettings.vim: makes netrw settings simpler |
13030
92a0a33f8296
move netrw back to the previous version
Christian Brabandt <cb@256bit.org>
parents:
12785
diff
changeset
|
2 " Date: Dec 30, 2014 |
4339 | 3 " Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz> |
13030
92a0a33f8296
move netrw back to the previous version
Christian Brabandt <cb@256bit.org>
parents:
12785
diff
changeset
|
4 " Version: 15 |
4339 | 5 " Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1 |
557 | 6 " Permission is hereby granted to use and distribute this code, |
7 " with or without modifications, provided that this copyright | |
8 " notice is copied with it. Like anything else that's free, | |
9 " netrwSettings.vim is provided *as is* and comes with no | |
10 " warranty of any kind, either expressed or implied. By using | |
11 " this plugin, you agree that in no event will the copyright | |
12 " holder be liable for any damages resulting from the use | |
13 " of this software. | |
14 " | |
15 " Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1 | |
16 " synagogues, preaching the gospel of the kingdom, and healing | |
17 " every disease and every sickness among the people. | |
18 " Load Once: {{{1 | |
19 if exists("g:loaded_netrwSettings") || &cp | |
20 finish | |
21 endif | |
13030
92a0a33f8296
move netrw back to the previous version
Christian Brabandt <cb@256bit.org>
parents:
12785
diff
changeset
|
22 let g:loaded_netrwSettings = "v15" |
2034 | 23 if v:version < 700 |
24 echohl WarningMsg | |
25 echo "***warning*** this version of netrwSettings needs vim 7.0" | |
26 echohl Normal | |
27 finish | |
28 endif | |
557 | 29 |
30 " --------------------------------------------------------------------- | |
31 " NetrwSettings: {{{1 | |
32 fun! netrwSettings#NetrwSettings() | |
33 " this call is here largely just to insure that netrw has been loaded | |
6476 | 34 call netrw#SavePosn() |
557 | 35 if !exists("g:loaded_netrw") |
36 echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None | |
37 return | |
38 endif | |
39 | |
40 above wincmd s | |
41 enew | |
42 setlocal noswapfile bh=wipe | |
43 set ft=vim | |
44 file Netrw\ Settings | |
45 | |
46 " these variables have the following default effects when they don't | |
47 " exist (ie. have not been set by the user in his/her .vimrc) | |
1122 | 48 if !exists("g:netrw_liststyle") |
49 let g:netrw_liststyle= 0 | |
557 | 50 let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa" |
51 endif | |
52 if !exists("g:netrw_silent") | |
53 let g:netrw_silent= 0 | |
54 endif | |
55 if !exists("g:netrw_use_nt_rcp") | |
56 let g:netrw_use_nt_rcp= 0 | |
57 endif | |
58 if !exists("g:netrw_ftp") | |
59 let g:netrw_ftp= 0 | |
60 endif | |
61 if !exists("g:netrw_ignorenetrc") | |
62 let g:netrw_ignorenetrc= 0 | |
63 endif | |
64 | |
798 | 65 put ='+ ---------------------------------------------' |
4339 | 66 put ='+ NetrwSettings: by Charles E. Campbell' |
798 | 67 put ='+ Press <F1> with cursor atop any line for help' |
68 put ='+ ---------------------------------------------' | |
557 | 69 let s:netrw_settings_stop= line(".") |
70 | |
71 put ='' | |
72 put ='+ Netrw Protocol Commands' | |
73 put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd | |
74 put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd | |
75 put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd | |
76 put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd | |
77 put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd | |
78 put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd | |
79 put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd | |
80 put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd | |
81 put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd | |
82 let s:netrw_protocol_stop= line(".") | |
83 put = '' | |
84 | |
85 put ='+Netrw Transfer Control' | |
86 put = 'let g:netrw_cygwin = '.g:netrw_cygwin | |
87 put = 'let g:netrw_ftp = '.g:netrw_ftp | |
88 put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode | |
89 put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc | |
1214 | 90 put = 'let g:netrw_sshport = '.g:netrw_sshport |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
91 put = 'let g:netrw_silent = '.g:netrw_silent |
557 | 92 put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp |
93 put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp | |
94 let s:netrw_xfer_stop= line(".") | |
1214 | 95 put ='' |
96 put ='+ Netrw Messages' | |
97 put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow | |
557 | 98 |
99 put = '' | |
100 put ='+ Netrw Browser Control' | |
5618 | 101 if exists("g:netrw_altfile") |
102 put = 'let g:netrw_altfile = '.g:netrw_altfile | |
103 else | |
104 put = 'let g:netrw_altfile = 0' | |
105 endif | |
557 | 106 put = 'let g:netrw_alto = '.g:netrw_alto |
107 put = 'let g:netrw_altv = '.g:netrw_altv | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
108 put = 'let g:netrw_banner = '.g:netrw_banner |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
109 if exists("g:netrw_bannerbackslash") |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
110 put = 'let g:netrw_bannerbackslash = '.g:netrw_bannerbackslash |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
111 else |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
112 put = '\" let g:netrw_bannerbackslash = (not defined)' |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
113 endif |
650 | 114 put = 'let g:netrw_browse_split = '.g:netrw_browse_split |
115 if exists("g:netrw_browsex_viewer") | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
116 put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer |
650 | 117 else |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
118 put = '\" let g:netrw_browsex_viewer = (not defined)' |
650 | 119 endif |
1621 | 120 put = 'let g:netrw_compress = '.g:netrw_compress |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
121 if exists("g:Netrw_corehandler") |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
122 put = 'let g:Netrw_corehandler = '.g:Netrw_corehandler |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
123 else |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
124 put = '\" let g:Netrw_corehandler = (not defined)' |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
125 endif |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
126 put = 'let g:netrw_ctags = '.g:netrw_ctags |
3920 | 127 put = 'let g:netrw_cursor = '.g:netrw_cursor |
1621 | 128 let decompressline= line("$") |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
129 put = 'let g:netrw_decompress = '.string(g:netrw_decompress) |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
130 if exists("g:netrw_dynamic_maxfilenamelen") |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
131 put = 'let g:netrw_dynamic_maxfilenamelen='.g:netrw_dynamic_maxfilenamelen |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
132 else |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
133 put = '\" let g:netrw_dynamic_maxfilenamelen= (not defined)' |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
134 endif |
557 | 135 put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
136 put = 'let g:netrw_errorlvl = '.g:netrw_errorlvl |
719 | 137 put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse |
1621 | 138 let fnameescline= line("$") |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
139 put = 'let g:netrw_fname_escape = '.string(g:netrw_fname_escape) |
557 | 140 put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject |
141 put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd | |
1122 | 142 put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd |
143 put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd | |
1621 | 144 let globescline= line("$") |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
145 put = 'let g:netrw_glob_escape = '.string(g:netrw_glob_escape) |
557 | 146 put = 'let g:netrw_hide = '.g:netrw_hide |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
147 if exists("g:netrw_home") |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
148 put = 'let g:netrw_home = '.g:netrw_home |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
149 else |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
150 put = '\" let g:netrw_home = (not defined)' |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
151 endif |
557 | 152 put = 'let g:netrw_keepdir = '.g:netrw_keepdir |
153 put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd | |
154 put = 'let g:netrw_list_hide = '.g:netrw_list_hide | |
1621 | 155 put = 'let g:netrw_liststyle = '.g:netrw_liststyle |
156 put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd | |
3920 | 157 put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir |
1621 | 158 put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
159 put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir |
557 | 160 put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen |
1122 | 161 put = 'let g:netrw_menu = '.g:netrw_menu |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
162 put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps |
557 | 163 put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
164 if exists("g:netrw_nobeval") |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
165 put = 'let g:netrw_nobeval = '.g:netrw_nobeval |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
166 else |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
167 put = '\" let g:netrw_nobeval = (not defined)' |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
168 endif |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
169 put = 'let g:netrw_remote_mkdir = '.g:netrw_remote_mkdir |
1621 | 170 put = 'let g:netrw_preview = '.g:netrw_preview |
557 | 171 put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd |
1621 | 172 put = 'let g:netrw_retmap = '.g:netrw_retmap |
557 | 173 put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd |
174 put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd | |
175 put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd | |
176 put = 'let g:netrw_sort_by = '.g:netrw_sort_by | |
177 put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction | |
1668 | 178 put = 'let g:netrw_sort_options = '.g:netrw_sort_options |
557 | 179 put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence |
6476 | 180 put = 'let g:netrw_servername = '.g:netrw_servername |
1621 | 181 put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax |
557 | 182 put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
183 put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd |
1214 | 184 put = 'let g:netrw_scpport = '.g:netrw_scpport |
2034 | 185 put = 'let g:netrw_sepchr = '.g:netrw_sepchr |
1214 | 186 put = 'let g:netrw_sshport = '.g:netrw_sshport |
557 | 187 put = 'let g:netrw_timefmt = '.g:netrw_timefmt |
1621 | 188 let tmpfileescline= line("$") |
189 put ='let g:netrw_tmpfile_escape...' | |
1122 | 190 put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf |
1621 | 191 put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen |
557 | 192 put = 'let g:netrw_winsize = '.g:netrw_winsize |
193 | |
194 put ='' | |
1214 | 195 put ='+ For help, place cursor on line and press <F1>' |
557 | 196 |
197 1d | |
198 silent %s/^+/"/e | |
199 res 99 | |
200 silent %s/= \([^0-9].*\)$/= '\1'/e | |
201 silent %s/= $/= ''/e | |
202 1 | |
203 | |
1621 | 204 call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1','')) |
205 call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'") | |
206 call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'") | |
207 call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'") | |
1122 | 208 |
557 | 209 set nomod |
210 | |
1122 | 211 nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr> |
212 nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr> | |
557 | 213 let tmpfile= tempname() |
214 exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod' | |
215 endfun | |
216 | |
217 " --------------------------------------------------------------------- | |
218 " NetrwSettingHelp: {{{2 | |
219 fun! NetrwSettingHelp() | |
220 " call Dfunc("NetrwSettingHelp()") | |
221 let curline = getline(".") | |
222 if curline =~ '=' | |
223 let varhelp = substitute(curline,'^\s*let ','','e') | |
224 let varhelp = substitute(varhelp,'\s*=.*$','','e') | |
225 " call Decho("trying help ".varhelp) | |
226 try | |
227 exe "he ".varhelp | |
228 catch /^Vim\%((\a\+)\)\=:E149/ | |
229 echo "***sorry*** no help available for <".varhelp.">" | |
230 endtry | |
231 elseif line(".") < s:netrw_settings_stop | |
232 he netrw-settings | |
233 elseif line(".") < s:netrw_protocol_stop | |
234 he netrw-externapp | |
235 elseif line(".") < s:netrw_xfer_stop | |
236 he netrw-variables | |
237 else | |
238 he netrw-browse-var | |
239 endif | |
240 " call Dret("NetrwSettingHelp") | |
241 endfun | |
242 | |
243 " --------------------------------------------------------------------- | |
244 " Modelines: {{{1 | |
245 " vim:ts=8 fdm=marker |