Dup Ver Goto 📝

VimFunctions

PT2/editor/vim/vimscript does not exist
To
22 lines, 38 words, 392 chars Page 'VimFunctions' does not exist.

Defining functions

function CommentLine()
  :s@.*@<!--&-->@
endfunction
function UnCommentLine()
  :s@<!--\(.*\)-->@\1@
endfunction 

Calling functions

call CommentLine()

Mapping Functions

nnoremap \kc :call CommentLine()<cr>
vnoremap \kc :call CommentLine()<cr>