美文网首页
5.convert_find_substitute

5.convert_find_substitute

作者: 泠泉 | 来源:发表于2019-06-07 08:49 被阅读0次
    " Insert  
    Shift-i/A               insert mode and move to head/tail  
    a/i                     cursor after/befor insert  
    [n]O/o                  line before/afer insert n times  
    [n]-i                   insert mode repeate n times  
      
      
    " Convert  
    ~                       char upper/lower  
    g ~ w                   word upper/lower  
    g ~ $/g ~ ~             line upper/lower  
    gU/uw                   word upper/lower  
      
      
    " Find  
    F/f{char}               backwards/forewards find a char  
    t/T{char}               find a char before target  
    dt{char}/df{space}      delete from cursor to find target  
    /{char}                 command line find  
      
      
    " substitute  
            [range][substitute]/{pattern}/{String}/[flags]  
    s/going/rolling/g               this line all "going" substitue to "rolling"  
    %s/going/rolling/g              % matches all range  
      
    Shift-r/R                       substitute mode  
    r                               char substitute  
    cw                              change word  
    c$/C                            change line after cursor  

    相关文章

      网友评论

          本文标题:5.convert_find_substitute

          本文链接:https://www.haomeiwen.com/subject/knfmxctx.html