[nvim] use the built-in expansion mechanism in makeprg

This commit is contained in:
Dmytro Meleshko 2021-05-25 19:09:12 +03:00
parent eea04f738e
commit 432cb47135
3 changed files with 3 additions and 15 deletions

View file

@ -1,11 +1,5 @@
source <sfile>:h/text.vim
let s:src_file = expand('%')
let s:out_file = s:src_file.'.html'
let &l:makeprg = 'markdown2htmldoc'
for s:arg in get(g:, 'dotfiles_markdown2htmldoc_options', [])
let &l:makeprg .= ' '.shellescape(s:arg)
endfor
let &l:makeprg .= ' -- '.shellescape(s:src_file).' '.shellescape(s:out_file)
let &l:makeprg = 'markdown2htmldoc -- %:S %:S.html'
nnoremap <buffer> <F5> <Cmd>Open %.html<CR>

View file

@ -1,9 +1,3 @@
source <sfile>:h/css.vim
let s:src_file = expand('%')
let s:out_file = s:src_file.'.css'
let &l:makeprg = 'sass'
for s:arg in get(g:, 'dotfiles_dart_sass_options', [])
let &l:makeprg .= ' '.shellescape(s:arg)
endfor
let &l:makeprg .= ' -- '.shellescape(s:src_file).':'.shellescape(s:out_file)
let &l:makeprg = 'sass -- %:S:%:S.css'

View file

@ -139,4 +139,4 @@ endif
" }}}
nnoremap <silent> <F9> <Cmd>make<CR>
nnoremap <silent> <F9> <Cmd>make!<CR>