Skip to content

Commit 80e0e37

Browse files
author
skywind3000
committed
- new macro $(VIM_PWD) to store vim's current working directory (:pwd returns).
It is different with `$(VIM_CWD)`, `$(VIM_CWD)` will follow `-cwd=xxx` option, but `$(VIM_PWD)` will save the current directory before executing the command.
1 parent 314e8d5 commit 80e0e37

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugin/asyncrun.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018, 2019, 2020
44
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
55
"
6-
" Last Modified: 2020/04/07 20:18
6+
" Last Modified: 2020/04/08 02:58
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1725,9 +1725,11 @@ function! asyncrun#run(bang, opts, args, ...)
17251725
let l:macros['VIM_PRONAME'] = fnamemodify(l:macros['VIM_ROOT'], ':t')
17261726
let l:macros['VIM_DIRNAME'] = fnamemodify(l:macros['VIM_CWD'], ':t')
17271727
let l:macros['VIM_WORKSPACE'] = asyncrun#workspace()
1728+
let l:macros['VIM_PWD'] = l:macros['VIM_CWD']
17281729
let l:macros['<cwd>'] = l:macros['VIM_CWD']
17291730
let l:macros['<root>'] = l:macros['VIM_ROOT']
17301731
let l:macros['<workspace>'] = l:macros['VIM_WORKSPACE']
1732+
let l:macros['<pwd>'] = l:macros['VIM_PWD']
17311733
let l:retval = ''
17321734

17331735
" handle: empty extension
@@ -1874,7 +1876,7 @@ endfunc
18741876
" asyncrun - version
18751877
"----------------------------------------------------------------------
18761878
function! asyncrun#version()
1877-
return '2.7.2'
1879+
return '2.7.3'
18781880
endfunc
18791881

18801882

0 commit comments

Comments
 (0)