When I code, I tend to execute the following manually a lot after having selected multiple lines of code.
I want to add this to my .vimrc but I am having troubles making it work. The intention is to be able to select a set of lines and then press mapleader c and vim will add an extra # at the beginning of all selected lines.
1 " Key mapping. 2 let mapleader = "," ... 141 nmap <silent> <leader>c :<'>'s/^/#/<CR>
Line 141 seems to just delete the selected lines and I am having troubles seeing why this is. Any ideas what I am doing wrong or what I can change to get this to work?