Skip to content

Commit

Permalink
Remove duplicate help tag (issue #20)
Browse files Browse the repository at this point in the history
See issue #20 on GitHub:
  #20
  • Loading branch information
xolox committed Sep 2, 2013
1 parent 1e1a116 commit 80f04f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -54,7 +54,9 @@ Because Vim's [v:shell_error] [] variable is read only (which means it cannot be

The `:MakeWithShell` command uses Vim's [quickfix window] []. To make the shell plug-in use the [location-list] [] instead you can use the command `:LMakeWithShell` instead.

### The `xolox#misc#os#exec()` function
### The `xolox#shell#execute_with_dll()` function

The function `xolox#shell#execute_with_dll()` is used by `xolox#misc#os#exec()` and shouldn't be called directly; instead please call `xolox#misc#os#exec()` (this is what my plug-ins do). For this reason the remainder of the following text discusses the `xolox#misc#os#exec()` function.

This function enables other Vim plug-ins to execute external commands in the background (i.e. asynchronously) *without opening a command prompt window on Windows*. For example try to execute the following command on Windows ([vimrun.exe] [vimrun] is only included with Vim for Windows because it isn't needed on other platforms):

Expand All @@ -64,7 +66,7 @@ Immediately after executing this command Vim will respond to input again because

The function returns a dictionary of return values. In asynchronous mode the dictionary is empty. In synchronous mode it contains the following key/value pairs:

:echo xolox#misc#os#exec({'command': 'echo "this is stdout" && echo "this is stderr" >&2 && exit 42'})
:echo xolox#misc#os#exec({'command': 'echo "this is stdout" && echo "this is stderr" >&2 && exit 42', 'check': 0})
{'exit_code': 42, 'stdout': ['this is stdout'], 'stderr': ['this is stderr']}

If you want to verify that this function works as described, execute the command mentioning `vimrun` above, open the Windows task manager by pressing `Control-Shift-Escape` and check that the process `vimrun.exe` is listed in the processes tab. If you don't see the problem this is solving, try executing [vimrun.exe] [vimrun] using Vim's built-in [system()] [system] function instead:
Expand Down
4 changes: 2 additions & 2 deletions autoload/xolox/shell.vim
@@ -1,9 +1,9 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: August 19, 2013
" Last Change: September 2, 2013
" URL: http://peterodding.com/code/vim/shell/

let g:xolox#shell#version = '0.13.1'
let g:xolox#shell#version = '0.13.2'

if !exists('s:fullscreen_enabled')
let s:enoimpl = "%s() hasn't been implemented on your platform! %s"
Expand Down
15 changes: 10 additions & 5 deletions doc/shell.txt
Expand Up @@ -10,7 +10,7 @@ Contents ~
2. The |:Fullscreen| command
3. The |:Open| command
4. The |:MakeWithShell| command
5. The |xolox#misc#os#exec()| function
5. The |xolox#shell#execute_with_dll()| function
6. The |xolox#shell#fullscreen()| function
7. The |xolox#shell#is_fullscreen()| function
8. The |g:shell_fullscreen_items| option
Expand Down Expand Up @@ -43,7 +43,7 @@ This plug-in aims to improve the integration between Vim and its environment
names, URLs and e-mail addresses in your favorite programs (file manager,
web browser, e-mail client, etc).

- The |xolox#misc#os#exec()| function enables other Vim plug-ins (like my
- The 'xolox#misc#os#exec()' function enables other Vim plug-ins (like my
easytags.vim [2] plug-in) to execute external commands in the background
(i.e. asynchronously) _without opening a command prompt window on Windows_.

Expand Down Expand Up @@ -136,7 +136,12 @@ plug-in use the |location-list| instead you can use the command
':LMakeWithShell' instead.

-------------------------------------------------------------------------------
The *xolox#misc#os#exec()* function
The *xolox#shell#execute_with_dll()* function

The function |xolox#shell#execute_with_dll()| is used by 'xolox#misc#os#exec()'
and shouldn't be called directly; instead please call 'xolox#misc#os#exec()'
(this is what my plug-ins do). For this reason the remainder of the following
text discusses the 'xolox#misc#os#exec()' function.

This function enables other Vim plug-ins to execute external commands in the
background (i.e. asynchronously) _without opening a command prompt window on
Expand All @@ -147,7 +152,7 @@ it isn't needed on other platforms):
:call xolox#misc#os#exec({'command': 'vimrun', 'async': 1})
<
Immediately after executing this command Vim will respond to input again
because |xolox#misc#os#exec()| doesn't wait for the external command to finish
because 'xolox#misc#os#exec()' doesn't wait for the external command to finish
when the 'async' argument is true (1). In addition no command prompt window
will be shown which means vimrun.exe (see |win32-vimrun|) is running completely
invisible in the background.
Expand All @@ -156,7 +161,7 @@ The function returns a dictionary of return values. In asynchronous mode the
dictionary is empty. In synchronous mode it contains the following key/value
pairs:
>
:echo xolox#misc#os#exec({'command': 'echo "this is stdout" && echo "this is stderr" >&2 && exit 42'})
:echo xolox#misc#os#exec({'command': 'echo "this is stdout" && echo "this is stderr" >&2 && exit 42', 'check': 0})
{'exit_code': 42, 'stdout': ['this is stdout'], 'stderr': ['this is stderr']}
<
If you want to verify that this function works as described, execute the
Expand Down

0 comments on commit 80f04f0

Please sign in to comment.