美文网首页
4.reg_delete_copy_paste

4.reg_delete_copy_paste

作者: 泠泉 | 来源:发表于2019-06-07 08:50 被阅读0次
Windows         Vim             Different  
cut             delete          as cut, rather than just delete  
copy            yank            equal window's copy, but c used to change, yank instead  
paste           put             equal head word  
""""""""""""""""""""""""""""""""""""""""""""""""""""  
  
" Register  
        type            express         example         feature  
----------------------------------------------------------------------------------------  
        nameless        ""              "" p=p          will be covered by last item  
------------------------------------------------------------------------------------------  
        number          "0              "0p             0 used to copy only  
                        "{1-9}          "1P             1-9 used to recent 9 times line delete or edit  
------------------------------------------------------------------------------------------  
        named           "[a-z]/[A-Z]    "ayw            yank word to reg a. put via "ap  
-------------------------------------------------------------------------------------------------------  
        black hole      "_              "_dw            just delete rather then cover nameless reg  
  
  
"""""""""""""""""""""""""""  
" primary operations  
"""""""""""""""""""""""""""  
d=delete        cut  
y=yank          copy  
p=put           paste  
u=undo          undo  
Ctrl-r=redo     redo  
  
"""""""""""""""""""""""""""  
to see reg.                             :reg  
yank a line to named reg  t             "tyy  
delete with black hole                  "_dd  
  
  
"""""""""""""""""""""""""""  
" advance operations  
"""""""""""""""""""""""""  
yw              copy cursor word  
y2w             copy forward 2 word  
p/P             copy to cursor after/before  
yy              copy this line  
                                                                                                                                          
"""""""""""""""""""""""""""  
" adjust word:  Practica lvim  
""""""""""""""""""""""""""  
{start}         Practica lvim  
F{space}        Practica lvim  
x               Practicalvim  
p               Practical vim  
  
  
""""""""""""""""""""""""""""""""""""""""""""""""""""""""  
" combination delete ([count]operation([count]{motion})  
""""""""""""""""""""""""""""""""""""""""""""""""""""""""  
x/X             delete char  
dw=delete word  delete a word  
d{hjkl}         delete a char of orient  
d$=D            delete cursor to tail  
d^              delete cursor to head  
dd              delete line  
{n}dd           delete downwards  n line  
5dw             delete word forewards 5 times  
3w              move word forewards 3 times  
D3w             delete 3w forewards action  
2d3w            delete 3w forewards action 2 times  

网友评论

      本文标题:4.reg_delete_copy_paste

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