11" Vim auto-load script
22" Author: Peter Odding <peter@peterodding.com>
3- " Last Change: June 17 , 2011
3+ " Last Change: June 18 , 2011
44" URL: http://peterodding.com/code/vim/shell/
55
6- if ! exists (' s:script' )
7- let s: script = ' shell.vim'
6+ if ! exists (' s:fullscreen_enabled' )
87 let s: enoimpl = " %s() hasn't been implemented on your platform! %s"
9- let s: contact = " If you have suggestions, please contact the vim_dev mailing-list or peter@peterodding.com."
8+ let s: contact = " If you have suggestions, please contact peter@peterodding.com."
109 let s: fullscreen_enabled = 0
1110endif
1211
@@ -23,12 +22,12 @@ function! xolox#shell#open_cmd(arg) " -- implementation of the :Open command {{{
2322 if isdirectory (arg) || filereadable (arg)
2423 call xolox#misc#open#file (arg)
2524 else
26- let msg = " %s: I don't know how to open %s! "
27- echoerr printf (msg, s: script , string ( a: arg ) )
25+ let msg = " I don't know how to open '%s'! %s "
26+ echoerr printf (msg, a: arg , s: contact )
2827 endif
2928 endif
3029 catch
31- call xolox#misc#msg#warn (" %s at %s" , v: exception , v: throwpoint )
30+ call xolox#misc#msg#warn (" shell.vim %s: %s at %s" , g: shell_version , v: exception , v: throwpoint )
3231 endtry
3332endfunction
3433
@@ -66,8 +65,8 @@ function! xolox#shell#open_with_windows_shell(location)
6665 if xolox#misc#os#is_win () && s: has_dll ()
6766 let error = s: library_call (' openurl' , a: location )
6867 if error != ' '
69- let msg = ' %s: Failed to open %s with Windows shell! (error: %s)'
70- throw printf (msg, s: script , string ( a: location) , strtrans (xolox#misc#str#trim (error )))
68+ let msg = " shell.vim %s: Failed to open '%s' with Windows shell! (error: %s)"
69+ throw printf (msg, g: shell_version , a: location , strtrans (xolox#misc#str#trim (error )))
7170 endif
7271 endif
7372endfunction
@@ -128,7 +127,7 @@ function! xolox#shell#execute(command, synchronous, ...) " -- execute external c
128127 return 1
129128 endif
130129 catch
131- call xolox#misc#msg#warn (" %s: %s at %s" , s: script , v: exception , v: throwpoint )
130+ call xolox#misc#msg#warn (" shell.vim %s: %s at %s" , g: shell_version , v: exception , v: throwpoint )
132131 finally
133132 if exists (' tempin' ) | call delete (tempin) | endif
134133 if exists (' tempout' ) | call delete (tempout) | endif
@@ -179,7 +178,7 @@ function! xolox#shell#fullscreen() " -- toggle Vim between normal and full-scree
179178 throw printf (s: enoimpl , ' fullscreen' , s: contact )
180179 endif
181180 catch
182- call xolox#misc#msg#warn (" %s: %s at %s" , s: script , v: exception , v: throwpoint )
181+ call xolox#misc#msg#warn (" shell.vim %s: %s at %s" , g: shell_version , v: exception , v: throwpoint )
183182 endtry
184183
185184 " When leaving full-screen...
@@ -208,7 +207,7 @@ function! xolox#shell#fullscreen() " -- toggle Vim between normal and full-scree
208207 " Take a moment to let Vim's GUI finish redrawing (:redraw is
209208 " useless here because it only redraws Vim's internal state).
210209 sleep 50 m
211- call xolox#misc#msg#info (" To return from full-screen type <F11> or execute :Fullscreen." )
210+ call xolox#misc#msg#info (" shell.vim %s: To return from full-screen type <F11> or execute :Fullscreen." , g: shell_version )
212211 endif
213212
214213endfunction
0 commit comments