1
1
" Vim auto-load script
2
2
" Author: Peter Odding <peter@peterodding.com>
3
- " Last Change: June 17 , 2011
3
+ " Last Change: June 18 , 2011
4
4
" URL: http://peterodding.com/code/vim/shell/
5
5
6
- if ! exists (' s:script' )
7
- let s: script = ' shell.vim'
6
+ if ! exists (' s:fullscreen_enabled' )
8
7
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."
10
9
let s: fullscreen_enabled = 0
11
10
endif
12
11
@@ -23,12 +22,12 @@ function! xolox#shell#open_cmd(arg) " -- implementation of the :Open command {{{
23
22
if isdirectory (arg) || filereadable (arg)
24
23
call xolox#misc#open#file (arg)
25
24
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 )
28
27
endif
29
28
endif
30
29
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 )
32
31
endtry
33
32
endfunction
34
33
@@ -66,8 +65,8 @@ function! xolox#shell#open_with_windows_shell(location)
66
65
if xolox#misc#os#is_win () && s: has_dll ()
67
66
let error = s: library_call (' openurl' , a: location )
68
67
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 )))
71
70
endif
72
71
endif
73
72
endfunction
@@ -128,7 +127,7 @@ function! xolox#shell#execute(command, synchronous, ...) " -- execute external c
128
127
return 1
129
128
endif
130
129
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 )
132
131
finally
133
132
if exists (' tempin' ) | call delete (tempin) | endif
134
133
if exists (' tempout' ) | call delete (tempout) | endif
@@ -179,7 +178,7 @@ function! xolox#shell#fullscreen() " -- toggle Vim between normal and full-scree
179
178
throw printf (s: enoimpl , ' fullscreen' , s: contact )
180
179
endif
181
180
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 )
183
182
endtry
184
183
185
184
" When leaving full-screen...
@@ -208,7 +207,7 @@ function! xolox#shell#fullscreen() " -- toggle Vim between normal and full-scree
208
207
" Take a moment to let Vim's GUI finish redrawing (:redraw is
209
208
" useless here because it only redraws Vim's internal state).
210
209
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 )
212
211
endif
213
212
214
213
endfunction
0 commit comments