I think a nice way to do the comments is key mapping. I need to comment/un-comment c style code, here is my mapping
nnoremap <leader>c 0<insert>//<Esc>
nnoremap <leader>' 0xx
the second one is for un-commenting, it just moves the cursor to the beginning of the line and delete 2 times.
I wonder is there a possibility to write an if statements here, I mean moving the cursor in the beginning of the line and check if the first two characters is backslash, if yes, then delete twice, if not, do nothing
Thanks