diff --git a/.vimrc b/.vimrc index 99f95f7..111f0fc 100644 --- a/.vimrc +++ b/.vimrc @@ -34,7 +34,14 @@ set shell=bash\ -l " Shortcuts command! Proximate :e ~/Cloud/Notes/Proximate.md command! W :w|b#|bd# -command! -range Comment ,s/\%V.*\%V.// +command! -range Comment call CommentWrap(, ) + +function! CommentWrap(start, end) + " Insert closing comment after the last line + call append(a:end, '--->') + " Insert opening comment before the first line + call append(a:start - 1, '