vim命令模式

删除指定字符

g for global

  1. #delete all <char> in current file
  2. :%s/<char>/[4replace]/g
  3. #delete <char> from line 10 to 33 in the file
  4. :10,33s/<char>/[4replace]/g
  5. #delete <char> form line n to the end in the file
  6. :n,$s/<char>/[4replace]/g