Compare commits

..

4 commits

Author SHA1 Message Date
pull[bot]
ffd4e25823
Merge pull request #266 from dmitmel/master
[pull] master from dmitmel:master
2021-05-25 20:58:30 +00:00
Dmytro Meleshko
7ded7fc2f3 [nvim] show filename in a confirmation prompt for Bbye 2021-05-25 19:58:01 +03:00
Dmytro Meleshko
a281507269 [nvim] add a makeprg for awk 2021-05-25 19:40:42 +03:00
Dmytro Meleshko
432cb47135 [nvim] use the built-in expansion mechanism in makeprg 2021-05-25 19:09:12 +03:00
4 changed files with 9 additions and 16 deletions

View file

@ -0,0 +1,4 @@
" <https://stackoverflow.com/a/7212314/12005228>
let &l:makeprg = 'awk --lint --source "BEGIN{exit(0)}END{exit(0)}" --file %:S'
" <https://github.com/WolfgangMehner/vim-plugins/blob/a673942f0b7fe9cbbb19282ee4c3ebe5decf2a1d/plugin/awk-support.vim#L570>
let &l:errorformat = 'awk: %f:%l: %m'

View file

@ -1,11 +1,5 @@
source <sfile>:h/text.vim source <sfile>:h/text.vim
let s:src_file = expand('%') let &l:makeprg = 'markdown2htmldoc -- %:S %:S.html'
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)
nnoremap <buffer> <F5> <Cmd>Open %.html<CR> nnoremap <buffer> <F5> <Cmd>Open %.html<CR>

View file

@ -1,9 +1,3 @@
source <sfile>:h/css.vim source <sfile>:h/css.vim
let s:src_file = expand('%') let &l:makeprg = 'sass -- %:S:%:S.css'
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)

View file

@ -43,7 +43,8 @@ endif
function s:CloseBuffer(cmd) abort function s:CloseBuffer(cmd) abort
let cmd = a:cmd let cmd = a:cmd
if &modified if &modified
let answer = confirm("Save changes?", "&Yes\n&No\n&Cancel") " <https://github.com/neovim/neovim/blob/a282a177d3320db25fa8f854cbcdbe0bc6abde7f/src/nvim/ex_cmds2.c#L1400>
let answer = confirm("Save changes to \"".expand('%')."\"?", "&Yes\n&No\n&Cancel")
if answer ==# 1 " Yes if answer ==# 1 " Yes
write write
elseif answer ==# 2 " No elseif answer ==# 2 " No
@ -139,4 +140,4 @@ endif
" }}} " }}}
nnoremap <silent> <F9> <Cmd>make<CR> nnoremap <silent> <F9> <Cmd>make!<CR>