minor convenience tweaks

This commit is contained in:
2018-05-23 12:55:22 +02:00
parent dcfbdd871b
commit 897b79118d
3 changed files with 17 additions and 7 deletions

View File

@@ -7,7 +7,8 @@ let s:comment_map = {
\ 'vim': '"',
\ 'tex': '%',
\ 'plaintex': '%',
\ 'sh': '#'
\ 'sh': '#',
\ 'make': '#',
\ }
let s:block_map = {
@@ -28,7 +29,8 @@ function! MyCommenter(uncomment) range
endif
let search_range = a:firstline . ',' . a:lastline
" Uncomment the line (when commenting this avoids multiple comment chars)
" Uncomment the line anyway (when commenting this avoids multiple comment
" chars)
execute search_range . 's/\(^\s*\)\(' . comment . '\s*\)\+/\1/e'
if !a:uncomment
" Comment