Skip to content

Commit

Permalink
Don't error out when vim-shell is not installed (issue #7)
Browse files Browse the repository at this point in the history
This is the most obscure interaction of syntax and semantics I
have found in the 5+ years I've been writing Vim script now :-(

For more information, see issue #7 on GitHub:
  #7
  • Loading branch information
xolox committed Jun 26, 2013
1 parent d780f0a commit 6fe6e26
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -38,7 +38,7 @@ from the source code of the miscellaneous scripts using the Python module
<!-- Start of generated documentation -->

The documentation of the 80 functions below was extracted from
15 Vim scripts on June 26, 2013 at 00:09.
15 Vim scripts on June 26, 2013 at 10:55.

### Handling of special buffers

Expand Down
4 changes: 2 additions & 2 deletions autoload/xolox/misc.vim
@@ -1,7 +1,7 @@
" The version of my miscellaneous scripts.
"
" Author: Peter Odding <peter@peterodding.com>
" Last Change: June 25, 2013
" Last Change: June 26, 2013
" URL: http://peterodding.com/code/vim/misc/

let g:xolox#misc#version = '1.8.3'
let g:xolox#misc#version = '1.8.4'
8 changes: 5 additions & 3 deletions autoload/xolox/misc/os.vim
@@ -1,7 +1,7 @@
" Operating system interfaces.
"
" Author: Peter Odding <peter@peterodding.com>
" Last Change: June 25, 2013
" Last Change: June , 2013
" URL: http://peterodding.com/code/vim/misc/

function! xolox#misc#os#is_mac() " {{{1
Expand Down Expand Up @@ -250,11 +250,13 @@ function! xolox#misc#os#can_use_dll() " {{{1
" and c) the compiled DLL included in vim-shell works, we can use the
" vim-shell plug-in to execute external commands! Returns 1 (true)
" if we can use the DLL, 0 (false) otherwise.
let can_use_dll = 0
try
return xolox#shell#can_use_dll()
let can_use_dll = xolox#shell#can_use_dll()
catch /^Vim\%((\a\+)\)\=:E117/
return 0
" Silence E117.
endtry
return can_use_dll
endfunction

function! s:readfile(fname, label, cmd) " {{{1
Expand Down
2 changes: 1 addition & 1 deletion doc/misc.txt
Expand Up @@ -151,7 +151,7 @@ from the source code of the miscellaneous scripts using the Python module
'vimdoctool.py' included in vim-tools [5].

The documentation of the 80 functions below was extracted from 15 Vim scripts
on June 26, 2013 at 00:09.
on June 26, 2013 at 10:55.

-------------------------------------------------------------------------------
*misc-handling-of-special-buffers*
Expand Down

0 comments on commit 6fe6e26

Please sign in to comment.