Remove all arbitary spaces before a line in Vim

前端 未结 9 2260
感动是毒
感动是毒 2020-12-01 02:56

I\'v written a plugin where it comes to parsing a XML tag. The content inside the tag is indented and when i copy the parsed string into the file it\'s gettting like:

<
9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 03:19

    Remove all consecutive spaces: :%s/ */ /g

    It was useful to me to go from:

    $screen-xs-min:              480px;
    $screen-sm-min:              768px;
    $screen-md-min:                992px;
    $screen-lg-min:                  1200px;
    

    To:

    $screen-xs-min: 480px;       
    $screen-sm-min: 768px;       
    $screen-md-min: 992px;           
    $screen-lg-min: 1200px;                                                                                                 
    

提交回复
热议问题