5.convert_find_substitute

2019-06-07  本文已影响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  
上一篇 下一篇

猜你喜欢

热点阅读