# To comment Press ESC hit V Move the cursor until desired lines to comment hit : '<,'>s/^/#/g # To uncomment Do the same, but command is: '<,'>s/^#//g # '<,'> indicates the range you've selected with VISUAL MODE.