How to Comment Lines in vi
In vi or vim, you can comment a range of lines by using a substitution command. This is handy when editing shell scripts, configuration files or temporary notes. Comment every line in the file Open the file in vi, press Esc, then run: This adds # at the start of every line. Use a different … Read more