2014年8月5日 星期二

Comment out multiple lines using vim

Reference
http://www.linuxask.com/questions/comment-out-multiple-lines-using-vim?utm_source=feedburner&utm_medium=twitter&utm_campaign=Feed%3A+linuxask+%28Linux+Ask%21%29



Comment out multiple lines using vim
Answer:
When you want to comment out multiple lines in a configuration file or a program script, it is easy with the help of vim.
Steps:
1. Change to command mode
2. Enable visual block editing by pressing Ctrl + V
3. Select the line(s)
4. Press "I", enter the character you needed, e.g. "#"
5. Press "Esc", then "Enter"