Mercurial > vim
comparison runtime/plugin/NetrwFileHandlers.vim @ 21:db5102f7e29f
updated for version 7.0013
author | vimboss |
---|---|
date | Thu, 29 Jul 2004 08:43:53 +0000 |
parents | 631143ac4a01 |
children | cc049b00ee70 |
comparison
equal
deleted
inserted
replaced
20:4ac1dce8dd5e | 21:db5102f7e29f |
---|---|
1 " NetrwFileHandlers: contains various extension-based file handlers for | 1 " NetrwFileHandlers: contains various extension-based file handlers for |
2 " netrw's browsers' x command | 2 " netrw's browsers' x command ("eXecute launcher") |
3 " Author: Charles E. Campbell, Jr. | 3 " Author: Charles E. Campbell, Jr. |
4 " Date: Jul 06, 2004 | 4 " Date: Jul 09, 2004 |
5 " Version: 3 | 5 " Version: 1 |
6 " --------------------------------------------------------------------- | 6 " --------------------------------------------------------------------- |
7 | 7 |
8 " NetrwFileHandler_html: handles html when the user hits "x" when the | 8 " NetrwFileHandler_html: handles html when the user hits "x" when the |
9 " cursor is atop a *.html file | 9 " cursor is atop a *.html file |
10 fun! NetrwFileHandler_html(pagefile) | 10 fun! NetrwFileHandler_html(pagefile) |
103 " call Dret("NetrwFileHandler_pnm 1") | 103 " call Dret("NetrwFileHandler_pnm 1") |
104 return 1 | 104 return 1 |
105 endfun | 105 endfun |
106 | 106 |
107 " --------------------------------------------------------------------- | 107 " --------------------------------------------------------------------- |
108 " NetrwFileHandler_bmp: | 108 " NetrwFileHandler_bmp: visualize bmp files |
109 fun! NetrwFileHandler_bmp(bmpfile) | 109 fun! NetrwFileHandler_bmp(bmpfile) |
110 " call Dfunc("NetrwFileHandler_bmp(bmpfile<".a:bmpfile.">)") | 110 " call Dfunc("NetrwFileHandler_bmp(bmpfile<".a:bmpfile.">)") |
111 | 111 |
112 if executable("gimp") | 112 if executable("gimp") |
113 exe "silent! !gimp -s ".a:bmpfile | 113 exe "silent! !gimp -s ".a:bmpfile |
121 " call Dret("NetrwFileHandler_bmp 1") | 121 " call Dret("NetrwFileHandler_bmp 1") |
122 return 1 | 122 return 1 |
123 endfun | 123 endfun |
124 | 124 |
125 " --------------------------------------------------------------------- | 125 " --------------------------------------------------------------------- |
126 " NetrwFileHandler_pdf: visualize pdf files | |
127 fun! NetrwFileHandler_pdf(pdf) | |
128 " call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)") | |
129 if executable("gs") | |
130 exe "silent! !gs ".a:pdf | |
131 else | |
132 " call Dret("NetrwFileHandler_pdf 0") | |
133 return 0 | |
134 endif | |
135 | |
136 " call Dret("NetrwFileHandler_pdf 1") | |
137 return 1 | |
138 endfun | |
139 | |
140 " --------------------------------------------------------------------- | |
141 " NetrwFileHandler_sxw: visualize sxw files | |
142 fun! NetrwFileHandler_sxw(sxw) | |
143 " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)") | |
144 if executable("gs") | |
145 exe "silent! !gs ".a:sxw | |
146 else | |
147 " call Dret("NetrwFileHandler_sxw 0") | |
148 return 0 | |
149 endif | |
150 | |
151 " call Dret("NetrwFileHandler_sxw 1") | |
152 return 1 | |
153 endfun | |
154 | |
155 " --------------------------------------------------------------------- | |
156 " NetrwFileHandler_doc: visualize doc files | |
157 fun! NetrwFileHandler_doc(doc) | |
158 " call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)") | |
159 | |
160 if executable("oowriter") | |
161 exe "silent! !oowriter ".a:doc | |
162 redraw! | |
163 else | |
164 " call Dret("NetrwFileHandler_doc 0") | |
165 return 0 | |
166 endif | |
167 | |
168 " call Dret("NetrwFileHandler_doc 1") | |
169 return 1 | |
170 endfun | |
171 | |
172 " --------------------------------------------------------------------- | |
173 " NetrwFileHandler_sxw: visualize sxw files | |
174 fun! NetrwFileHandler_sxw(sxw) | |
175 " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)") | |
176 | |
177 if executable("oowriter") | |
178 exe "silent! !oowriter ".a:sxw | |
179 redraw! | |
180 else | |
181 " call Dret("NetrwFileHandler_sxw 0") | |
182 return 0 | |
183 endif | |
184 | |
185 " call Dret("NetrwFileHandler_sxw 1") | |
186 return 1 | |
187 endfun | |
188 | |
189 " --------------------------------------------------------------------- | |
190 " NetrwFileHandler_xls: visualize xls files | |
191 fun! NetrwFileHandler_xls(xls) | |
192 " call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)") | |
193 | |
194 if executable("oocalc") | |
195 exe "silent! !oocalc ".a:xls | |
196 redraw! | |
197 else | |
198 " call Dret("NetrwFileHandler_xls 0") | |
199 return 0 | |
200 endif | |
201 | |
202 " call Dret("NetrwFileHandler_xls 1") | |
203 return 1 | |
204 endfun | |
205 | |
206 " --------------------------------------------------------------------- |