How do I add the comment character ‘#’ to a set of lines at the

beginning of each line? First, select the first character in all the lines using visual block mode (CTRL-V). Press ‘I’ to start inserting characters at the beginning of the line. Enter the comment character and then stop the insert mode by pressing <Esc>. Vim will automatically insert the entered characters at the beginning of all the selected lines.

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind