Skip to content

Commit

Permalink
fix: Do not display error msg when no generation can be done
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Jul 18, 2019
1 parent 1b1d88f commit aaaccc4
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions autoload/doge.vim
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
let s:save_cpo = &cpoptions
set cpoptions&vim

function! s:uppercase(str) abort
return substitute(a:str, '\(.*\)', '\U\1\e', 'g')
endfunction

""
" @public
" Generates documentation based on available patterns in b:doge_patterns.
Expand All @@ -16,22 +12,6 @@ function! doge#generate() abort
endif
return 1
endfor

echo '[DoGe] No patterns did match L' . line('.') . '.'
echo '--'
echohl WarningMsg
echo 'Is this a bug? Use the following link to quickly sent in a bug report for kkoomen/vim-doge:'
echohl None
let l:issue_title = substitute(s:uppercase(&filetype) . ' expression does not generate comment', '\s\+', '+', 'g')
echo printf('https://github.com/kkoomen/vim-doge/issues/new?labels=bug&template=bug_report.md&title=%s', l:issue_title)
else
echo '[DoGe] b:doge_patterns variable not found for filetype "' . s:uppercase(&filetype) . '".'
echo '--'
echohl WarningMsg
echo 'Should this filetype be supported? Use the following link to quickly sent in a feature request for kkoomen/vim-doge:'
echohl None
let l:issue_title = substitute('Add support for ' . s:uppercase(&filetype), '\s\+', '+', 'g')
echo printf('https://github.com/kkoomen/vim-doge/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=%s', l:issue_title)
endif
endfunction

Expand Down

0 comments on commit aaaccc4

Please sign in to comment.