map <F6> :s.^#.. <CR> :noh <CR>
map <F5> :s.^.#. <CR> :noh <CR>
add the above two lines in vimrc file which is generally located in /etc/vim
now use a visual line select(shift-v) to select what you want to comment
press F5 to comments the lines and F6 for uncommenting the lines