@@ -256,7 +256,7 @@ There can be some options before your '[cmd]':
256
256
modified files before executing.
257
257
258
258
- '-program=?': set to 'make' to use '&makeprg', 'grep' to use '&grepprt' and
259
- 'wsl' to execute commands in WSL (windows 10), see command modifiers [6] .
259
+ 'wsl' to execute commands in WSL (windows 10), see command modifiers.
260
260
261
261
- '-post=?': vimscript to exec after job finished, spaces **must** be escaped
262
262
to '\ '
@@ -272,7 +272,7 @@ There can be some options before your '[cmd]':
272
272
- '-pos=?': When using internal terminal with '-mode=term', '-pos' is used to
273
273
specify where to split the terminal window, it can be one of '"tab"',
274
274
'"curwin"', '"top"', '"bottom"', '"left"', '"right"' and '"external"'. And
275
- you can customize new runners [7] and pass runner's name to '-pos' option.
275
+ you can customize new runners and pass runner's name to '-pos' option.
276
276
277
277
- '-rows=num': When using a horizontal split terminal, this value represents
278
278
the height of terminal window.
@@ -329,12 +329,12 @@ Settings ~
329
329
330
330
- g:asyncrun_exit - script will be executed after finished.
331
331
- g:asyncrun_bell - non-zero to ring a bell after finished.
332
- - g:asyncrun_mode - specify how to run your command, see here [8 ].
332
+ - g:asyncrun_mode - specify how to run your command, see here [6 ].
333
333
- g:asyncrun_encs - set shell encoding if it's different from '&encoding',
334
- see encoding [9 ].
334
+ see encoding [7 ].
335
335
- g:asyncrun_trim - non-zero to trim the empty lines in the quickfix window.
336
336
- g:asyncrun_auto - event name to trigger QuickFixCmdPre/QuickFixCmdPost, see
337
- FAQ [10 ] .
337
+ FAQ [8 ].
338
338
- g:asyncrun_open - above zero to open quickfix window at given height after
339
339
command starts.
340
340
- g:asyncrun_save - non-zero to save current(1) or all(2) modified buffer(s)
@@ -344,7 +344,7 @@ Settings ~
344
344
- g:asyncrun_wrapper - enable to setup a command prefix.
345
345
- g:asyncrun_stdin - non-zero to enable stdin (useful for cmake on windows).
346
346
347
- For more information of above options, please visit **option details [11 ] **.
347
+ For more information of above options, please visit **option details [9 ]**.
348
348
349
349
-------------------------------------------------------------------------------
350
350
*asyncrun-variables*
@@ -406,7 +406,7 @@ command:
406
406
- 'bang' : same as '!'
407
407
- 'term' : open a reusable internal terminal window and run your command
408
408
409
- For more information, please see here [8 ].
409
+ For more information, please see here [6 ].
410
410
411
411
-------------------------------------------------------------------------------
412
412
*asyncrun-internal-terminal*
@@ -492,19 +492,22 @@ Customize Runner ~
492
492
You may want your command run in a tmux split or a new gnome-terminal window,
493
493
for this reason, AsyncRun allows you create new runners:
494
494
>
495
- function! s:my_runner(command )
496
- echo "run: " . a:command
495
+ function! MyRunner(opts )
496
+ echo "command to run is : " . a:opts.cmd
497
497
endfunction
498
498
499
499
let g:asyncrun_runner = get(g:, 'asyncrun_runner', {})
500
- let g:asyncrun_runner.test = { cmd -> s:my_runner(cmd) }
500
+ let g:asyncrun_runner.test = function('MyRunner')
501
501
<
502
502
Then try:
503
503
>
504
504
:AsyncRun -mode=term -pos=test ls -la $(VIM_FILEDIR)
505
505
<
506
506
When '-mode' is 'term' and '-pos' can used to represent runner name.
507
507
508
+ Runner function has only one argument: 'opts' , it contains the options
509
+ extracted from ':AsyncRun' command line, and 'opts.cmd' stores current command.
510
+
508
511
-------------------------------------------------------------------------------
509
512
*asyncrun-command-modifier*
510
513
Command Modifier ~
@@ -542,52 +545,52 @@ Recommend to use Vim 8.0 or later.
542
545
*asyncrun-cooperate-with-vim-fugitive*
543
546
Cooperate with vim-fugitive: ~
544
547
545
- asyncrun.vim can cooperate with 'vim-fugitive', see here [12 ] .
548
+ asyncrun.vim can cooperate with 'vim-fugitive', see here [10 ] .
546
549
547
- Image: (see reference [13 ] )
550
+ Image: (see reference [11 ] )
548
551
549
552
-------------------------------------------------------------------------------
550
553
*asyncrun-language-tips*
551
554
Language Tips ~
552
555
553
- - Better way for C/C++ developing with AsyncRun [14 ]
556
+ - Better way for C/C++ developing with AsyncRun [12 ]
554
557
555
558
-------------------------------------------------------------------------------
556
559
*asyncrun-more-topics*
557
560
More Topics ~
558
561
559
- - Additional examples (background ctags updating, pdf conversion, ...) [15 ]
560
- - Notify user job finished by playing a sound [16 ]
561
- - View progress in status line or vim airline [17 ]
562
- - Best practice with quickfix window [18 ]
563
- - Scroll the quickfix window only if the cursor is on the last line [19 ]
564
- - Replace old ':make' command with asyncrun [20 ]
565
- - Quickfix encoding problem when using Chinese or Japanese [9 ]
566
- - Example for updating and adding cscope files [21 ]
562
+ - Additional examples (background ctags updating, pdf conversion, ...) [13 ]
563
+ - Notify user job finished by playing a sound [14 ]
564
+ - View progress in status line or vim airline [15 ]
565
+ - Best practice with quickfix window [16 ]
566
+ - Scroll the quickfix window only if the cursor is on the last line [17 ]
567
+ - Replace old ':make' command with asyncrun [18 ]
568
+ - Quickfix encoding problem when using Chinese or Japanese [7 ]
569
+ - Example for updating and adding cscope files [19 ]
567
570
- The project root directory of the current file [5]
568
- - Specify how to run your command [8 ]
571
+ - Specify how to run your command [6 ]
569
572
570
- Don't forget to read the Frequently Asked Questions [22 ] .
573
+ Don't forget to read the Frequently Asked Questions [20 ] .
571
574
572
575
-------------------------------------------------------------------------------
573
576
*asyncrun-cooperate-with-other-plugins*
574
577
Cooperate with other Plugins ~
575
578
576
- - vim-fugitive [12 ] : perfect cooperation, asyncrun gets Gfetch/Gpush running
579
+ - vim-fugitive [10 ] : perfect cooperation, asyncrun gets Gfetch/Gpush running
577
580
in background
578
581
579
- - errormarker [23 ] : perfect cooperation, errormarker will display the signs
582
+ - errormarker [21 ] : perfect cooperation, errormarker will display the signs
580
583
on the error or warning lines
581
584
582
- - airline [24 ] : very well, airline will display status of background jobs
585
+ - airline [22 ] : very well, airline will display status of background jobs
583
586
584
- - sprint [25 ] : nice plugin who uses asyncrun to provide an IDE's run button
587
+ - sprint [23 ] : nice plugin who uses asyncrun to provide an IDE's run button
585
588
to runs your code
586
589
587
- - netrw [26 ] : netrw can save remote files on background now. Experimental,
590
+ - netrw [24 ] : netrw can save remote files on background now. Experimental,
588
591
take your own risk
589
592
590
- See: Cooperate with famous plugins [23 ]
593
+ See: Cooperate with famous plugins [21 ]
591
594
592
595
-------------------------------------------------------------------------------
593
596
*asyncrun-credits*
@@ -608,26 +611,24 @@ References ~
608
611
[3] doc/screenshot.gif
609
612
[4] https://github.com/skywind3000/asyncrun.vim/wiki/FAQ#cant-see-the-realtime-output-when-running-a-python-script
610
613
[5] https://github.com/skywind3000/asyncrun.vim/wiki/Project-Root
611
- [6] https://github.com/skywind3000/asyncrun.vim/wiki/Command-Modifier
612
- [7] https://github.com/skywind3000/asyncrun.vim/wiki/Customize-Runner
613
- [8] https://github.com/skywind3000/asyncrun.vim/wiki/Specify-how-to-run-your-command
614
- [9] https://github.com/skywind3000/asyncrun.vim/wiki/Quickfix-encoding-problem-when-using-Chinese-or-Japanese
615
- [10] https://github.com/skywind3000/asyncrun.vim/wiki/FAQ#can-asyncrunvim-trigger-an-autocommand-quickfixcmdpost-to-get-some-plugin-like-errormaker-processing-the-content-in-quickfix -
616
- [11] https://github.com/skywind3000/asyncrun.vim/wiki/Options
617
- [12] https://github.com/skywind3000/asyncrun.vim/wiki/Cooperate-with-famous-plugins#fugitive
618
- [13] https://rg.gosu.cc/skywind3000/asyncrun.vim/master/doc/cooperate_with_fugitive.gif
619
- [14] https://github.com/skywind3000/asyncrun.vim/wiki/Better-way-for-C-and-Cpp-development-in-Vim-8
620
- [15] https://github.com/skywind3000/asyncrun.vim/wiki/Additional-Examples
621
- [16] https://github.com/skywind3000/asyncrun.vim/wiki/Playing-Sound
622
- [17] https://github.com/skywind3000/asyncrun.vim/wiki/Display-Progress-in-Status-Line-or-Airline
623
- [18] https://github.com/skywind3000/asyncrun.vim/wiki/Quickfix-Best-Practice
624
- [19] https://github.com/skywind3000/asyncrun.vim/wiki/Scroll-the-quickfix-window-only-if-cursor-is-on-the-last-line
625
- [20] https://github.com/skywind3000/asyncrun.vim/wiki/Replace-old-make-command-with-AsyncRun
626
- [21] https://github.com/skywind3000/asyncrun.vim/wiki/Example-for-updating-and-adding-cscope
627
- [22] https://github.com/skywind3000/asyncrun.vim/wiki/FAQ
628
- [23] https://github.com/skywind3000/asyncrun.vim/wiki/Cooperate-with-famous-plugins
629
- [24] https://github.com/skywind3000/asyncrun.vim/wiki/Cooperate-with-famous-plugins#vim-airline
630
- [25] https://github.com/pedsm/sprint
631
- [26] https://github.com/skywind3000/asyncrun.vim/wiki/Get-netrw-using-asyncrun-to-save-remote-files
614
+ [6] https://github.com/skywind3000/asyncrun.vim/wiki/Specify-how-to-run-your-command
615
+ [7] https://github.com/skywind3000/asyncrun.vim/wiki/Quickfix-encoding-problem-when-using-Chinese-or-Japanese
616
+ [8] https://github.com/skywind3000/asyncrun.vim/wiki/FAQ#can-asyncrunvim-trigger-an-autocommand-quickfixcmdpost-to-get-some-plugin-like-errormaker-processing-the-content-in-quickfix -
617
+ [9] https://github.com/skywind3000/asyncrun.vim/wiki/Options
618
+ [10] https://github.com/skywind3000/asyncrun.vim/wiki/Cooperate-with-famous-plugins#fugitive
619
+ [11] https://rg.gosu.cc/skywind3000/asyncrun.vim/master/doc/cooperate_with_fugitive.gif
620
+ [12] https://github.com/skywind3000/asyncrun.vim/wiki/Better-way-for-C-and-Cpp-development-in-Vim-8
621
+ [13] https://github.com/skywind3000/asyncrun.vim/wiki/Additional-Examples
622
+ [14] https://github.com/skywind3000/asyncrun.vim/wiki/Playing-Sound
623
+ [15] https://github.com/skywind3000/asyncrun.vim/wiki/Display-Progress-in-Status-Line-or-Airline
624
+ [16] https://github.com/skywind3000/asyncrun.vim/wiki/Quickfix-Best-Practice
625
+ [17] https://github.com/skywind3000/asyncrun.vim/wiki/Scroll-the-quickfix-window-only-if-cursor-is-on-the-last-line
626
+ [18] https://github.com/skywind3000/asyncrun.vim/wiki/Replace-old-make-command-with-AsyncRun
627
+ [19] https://github.com/skywind3000/asyncrun.vim/wiki/Example-for-updating-and-adding-cscope
628
+ [20] https://github.com/skywind3000/asyncrun.vim/wiki/FAQ
629
+ [21] https://github.com/skywind3000/asyncrun.vim/wiki/Cooperate-with-famous-plugins
630
+ [22] https://github.com/skywind3000/asyncrun.vim/wiki/Cooperate-with-famous-plugins#vim-airline
631
+ [23] https://github.com/pedsm/sprint
632
+ [24] https://github.com/skywind3000/asyncrun.vim/wiki/Get-netrw-using-asyncrun-to-save-remote-files
632
633
633
634
vim: ft=help
0 commit comments